#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuestAttributes {
#[prost(string, tag = "1")]
pub query_path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub query_value: ::core::option::Option<GuestAttributesValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuestAttributesValue {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<GuestAttributesEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuestAttributesEntry {
#[prost(string, tag = "1")]
pub namespace: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttachedDisk {
#[prost(string, tag = "3")]
pub source_disk: ::prost::alloc::string::String,
#[prost(enumeration = "attached_disk::DiskMode", tag = "4")]
pub mode: i32,
}
pub mod attached_disk {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DiskMode {
Unspecified = 0,
ReadWrite = 1,
ReadOnly = 2,
}
impl DiskMode {
pub fn as_str_name(&self) -> &'static str {
match self {
DiskMode::Unspecified => "DISK_MODE_UNSPECIFIED",
DiskMode::ReadWrite => "READ_WRITE",
DiskMode::ReadOnly => "READ_ONLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISK_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"READ_WRITE" => Some(Self::ReadWrite),
"READ_ONLY" => Some(Self::ReadOnly),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SchedulingConfig {
#[prost(bool, tag = "1")]
pub preemptible: bool,
#[prost(bool, tag = "2")]
pub reserved: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkEndpoint {
#[prost(string, tag = "1")]
pub ip_address: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub port: i32,
#[prost(message, optional, tag = "5")]
pub access_config: ::core::option::Option<AccessConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessConfig {
#[prost(string, tag = "1")]
pub external_ip: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkConfig {
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subnetwork: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub enable_external_ips: bool,
#[prost(bool, tag = "4")]
pub can_ip_forward: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceAccount {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub scope: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Node {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub accelerator_type: ::prost::alloc::string::String,
#[prost(enumeration = "node::State", tag = "9")]
pub state: i32,
#[prost(string, tag = "10")]
pub health_description: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub runtime_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "36")]
pub network_config: ::core::option::Option<NetworkConfig>,
#[prost(string, tag = "13")]
pub cidr_block: ::prost::alloc::string::String,
#[prost(message, optional, tag = "37")]
pub service_account: ::core::option::Option<ServiceAccount>,
#[prost(message, optional, tag = "16")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "17")]
pub scheduling_config: ::core::option::Option<SchedulingConfig>,
#[prost(message, repeated, tag = "21")]
pub network_endpoints: ::prost::alloc::vec::Vec<NetworkEndpoint>,
#[prost(enumeration = "node::Health", tag = "22")]
pub health: i32,
#[prost(map = "string, string", tag = "24")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "34")]
pub metadata: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "40")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "33")]
pub id: i64,
#[prost(message, repeated, tag = "41")]
pub data_disks: ::prost::alloc::vec::Vec<AttachedDisk>,
#[prost(enumeration = "node::ApiVersion", tag = "38")]
pub api_version: i32,
#[prost(message, repeated, tag = "39")]
pub symptoms: ::prost::alloc::vec::Vec<Symptom>,
#[prost(string, tag = "43")]
pub queued_resource: ::prost::alloc::string::String,
#[prost(message, optional, tag = "45")]
pub shielded_instance_config: ::core::option::Option<ShieldedInstanceConfig>,
}
pub mod node {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Ready = 2,
Restarting = 3,
Reimaging = 4,
Deleting = 5,
Repairing = 6,
Stopped = 8,
Stopping = 9,
Starting = 10,
Preempted = 11,
Terminated = 12,
Hiding = 13,
Hidden = 14,
Unhiding = 15,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Ready => "READY",
State::Restarting => "RESTARTING",
State::Reimaging => "REIMAGING",
State::Deleting => "DELETING",
State::Repairing => "REPAIRING",
State::Stopped => "STOPPED",
State::Stopping => "STOPPING",
State::Starting => "STARTING",
State::Preempted => "PREEMPTED",
State::Terminated => "TERMINATED",
State::Hiding => "HIDING",
State::Hidden => "HIDDEN",
State::Unhiding => "UNHIDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"READY" => Some(Self::Ready),
"RESTARTING" => Some(Self::Restarting),
"REIMAGING" => Some(Self::Reimaging),
"DELETING" => Some(Self::Deleting),
"REPAIRING" => Some(Self::Repairing),
"STOPPED" => Some(Self::Stopped),
"STOPPING" => Some(Self::Stopping),
"STARTING" => Some(Self::Starting),
"PREEMPTED" => Some(Self::Preempted),
"TERMINATED" => Some(Self::Terminated),
"HIDING" => Some(Self::Hiding),
"HIDDEN" => Some(Self::Hidden),
"UNHIDING" => Some(Self::Unhiding),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
Unspecified = 0,
Healthy = 1,
Timeout = 3,
UnhealthyTensorflow = 4,
UnhealthyMaintenance = 5,
}
impl Health {
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unspecified => "HEALTH_UNSPECIFIED",
Health::Healthy => "HEALTHY",
Health::Timeout => "TIMEOUT",
Health::UnhealthyTensorflow => "UNHEALTHY_TENSORFLOW",
Health::UnhealthyMaintenance => "UNHEALTHY_MAINTENANCE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_UNSPECIFIED" => Some(Self::Unspecified),
"HEALTHY" => Some(Self::Healthy),
"TIMEOUT" => Some(Self::Timeout),
"UNHEALTHY_TENSORFLOW" => Some(Self::UnhealthyTensorflow),
"UNHEALTHY_MAINTENANCE" => Some(Self::UnhealthyMaintenance),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ApiVersion {
Unspecified = 0,
V1Alpha1 = 1,
V1 = 2,
V2Alpha1 = 3,
}
impl ApiVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
ApiVersion::Unspecified => "API_VERSION_UNSPECIFIED",
ApiVersion::V1Alpha1 => "V1_ALPHA1",
ApiVersion::V1 => "V1",
ApiVersion::V2Alpha1 => "V2_ALPHA1",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"API_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
"V1_ALPHA1" => Some(Self::V1Alpha1),
"V1" => Some(Self::V1),
"V2_ALPHA1" => Some(Self::V2Alpha1),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueuedResource {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub queueing_policy: ::core::option::Option<queued_resource::QueueingPolicy>,
#[prost(message, optional, tag = "6")]
pub state: ::core::option::Option<QueuedResourceState>,
#[prost(oneof = "queued_resource::Resource", tags = "2")]
pub resource: ::core::option::Option<queued_resource::Resource>,
#[prost(oneof = "queued_resource::Tier", tags = "3, 4")]
pub tier: ::core::option::Option<queued_resource::Tier>,
}
pub mod queued_resource {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tpu {
#[prost(message, repeated, tag = "1")]
pub node_spec: ::prost::alloc::vec::Vec<tpu::NodeSpec>,
}
pub mod tpu {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeSpec {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub node_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub node: ::core::option::Option<super::super::Node>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BestEffort {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Guaranteed {
#[prost(message, optional, tag = "1")]
pub min_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(bool, tag = "2")]
pub reserved: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueueingPolicy {
#[prost(
oneof = "queueing_policy::StartTimingConstraints",
tags = "1, 2, 3, 4, 5"
)]
pub start_timing_constraints: ::core::option::Option<
queueing_policy::StartTimingConstraints,
>,
}
pub mod queueing_policy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartTimingConstraints {
#[prost(message, tag = "1")]
ValidUntilDuration(::prost_types::Duration),
#[prost(message, tag = "2")]
ValidUntilTime(::prost_types::Timestamp),
#[prost(message, tag = "3")]
ValidAfterDuration(::prost_types::Duration),
#[prost(message, tag = "4")]
ValidAfterTime(::prost_types::Timestamp),
#[prost(message, tag = "5")]
ValidInterval(super::super::super::super::super::r#type::Interval),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Resource {
#[prost(message, tag = "2")]
Tpu(Tpu),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Tier {
#[prost(message, tag = "3")]
BestEffort(BestEffort),
#[prost(message, tag = "4")]
Guaranteed(Guaranteed),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueuedResourceState {
#[prost(enumeration = "queued_resource_state::State", tag = "1")]
pub state: i32,
#[prost(oneof = "queued_resource_state::StateData", tags = "2, 3, 4, 5, 6, 7, 8, 9")]
pub state_data: ::core::option::Option<queued_resource_state::StateData>,
}
pub mod queued_resource_state {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatingData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptedData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisioningData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FailedData {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<super::super::super::super::rpc::Status>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletingData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActiveData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuspendingData {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuspendedData {}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Accepted = 2,
Provisioning = 3,
Failed = 4,
Deleting = 5,
Active = 6,
Suspending = 7,
Suspended = 8,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Accepted => "ACCEPTED",
State::Provisioning => "PROVISIONING",
State::Failed => "FAILED",
State::Deleting => "DELETING",
State::Active => "ACTIVE",
State::Suspending => "SUSPENDING",
State::Suspended => "SUSPENDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"ACCEPTED" => Some(Self::Accepted),
"PROVISIONING" => Some(Self::Provisioning),
"FAILED" => Some(Self::Failed),
"DELETING" => Some(Self::Deleting),
"ACTIVE" => Some(Self::Active),
"SUSPENDING" => Some(Self::Suspending),
"SUSPENDED" => Some(Self::Suspended),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StateData {
#[prost(message, tag = "2")]
CreatingData(CreatingData),
#[prost(message, tag = "3")]
AcceptedData(AcceptedData),
#[prost(message, tag = "4")]
ProvisioningData(ProvisioningData),
#[prost(message, tag = "5")]
FailedData(FailedData),
#[prost(message, tag = "6")]
DeletingData(DeletingData),
#[prost(message, tag = "7")]
ActiveData(ActiveData),
#[prost(message, tag = "8")]
SuspendingData(SuspendingData),
#[prost(message, tag = "9")]
SuspendedData(SuspendedData),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodesRequest {
#[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,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodesResponse {
#[prost(message, repeated, tag = "1")]
pub nodes: ::prost::alloc::vec::Vec<Node>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNodeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNodeRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub node_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub node: ::core::option::Option<Node>,
#[prost(string, tag = "6")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteNodeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopNodeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartNodeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNodeRequest {
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "2")]
pub node: ::core::option::Option<Node>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListQueuedResourcesRequest {
#[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,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListQueuedResourcesResponse {
#[prost(message, repeated, tag = "1")]
pub queued_resources: ::prost::alloc::vec::Vec<QueuedResource>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetQueuedResourceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateQueuedResourceRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub queued_resource_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub queued_resource: ::core::option::Option<QueuedResource>,
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteQueuedResourceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceIdentity {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateServiceIdentityRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateServiceIdentityResponse {
#[prost(message, optional, tag = "1")]
pub identity: ::core::option::Option<ServiceIdentity>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceleratorType {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAcceleratorTypeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAcceleratorTypesRequest {
#[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 = "5")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAcceleratorTypesResponse {
#[prost(message, repeated, tag = "1")]
pub accelerator_types: ::prost::alloc::vec::Vec<AcceleratorType>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeVersion {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuntimeVersionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuntimeVersionsRequest {
#[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 = "5")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuntimeVersionsResponse {
#[prost(message, repeated, tag = "1")]
pub runtime_versions: ::prost::alloc::vec::Vec<RuntimeVersion>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub status_detail: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub cancel_requested: bool,
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Symptom {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "symptom::SymptomType", tag = "2")]
pub symptom_type: i32,
#[prost(string, tag = "3")]
pub details: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub worker_id: ::prost::alloc::string::String,
}
pub mod symptom {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SymptomType {
Unspecified = 0,
LowMemory = 1,
OutOfMemory = 2,
ExecuteTimedOut = 3,
MeshBuildFail = 4,
HbmOutOfMemory = 5,
ProjectAbuse = 6,
}
impl SymptomType {
pub fn as_str_name(&self) -> &'static str {
match self {
SymptomType::Unspecified => "SYMPTOM_TYPE_UNSPECIFIED",
SymptomType::LowMemory => "LOW_MEMORY",
SymptomType::OutOfMemory => "OUT_OF_MEMORY",
SymptomType::ExecuteTimedOut => "EXECUTE_TIMED_OUT",
SymptomType::MeshBuildFail => "MESH_BUILD_FAIL",
SymptomType::HbmOutOfMemory => "HBM_OUT_OF_MEMORY",
SymptomType::ProjectAbuse => "PROJECT_ABUSE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SYMPTOM_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LOW_MEMORY" => Some(Self::LowMemory),
"OUT_OF_MEMORY" => Some(Self::OutOfMemory),
"EXECUTE_TIMED_OUT" => Some(Self::ExecuteTimedOut),
"MESH_BUILD_FAIL" => Some(Self::MeshBuildFail),
"HBM_OUT_OF_MEMORY" => Some(Self::HbmOutOfMemory),
"PROJECT_ABUSE" => Some(Self::ProjectAbuse),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGuestAttributesRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query_path: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub worker_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGuestAttributesResponse {
#[prost(message, repeated, tag = "1")]
pub guest_attributes: ::prost::alloc::vec::Vec<GuestAttributes>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateMaintenanceEventRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub worker_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShieldedInstanceConfig {
#[prost(bool, tag = "1")]
pub enable_secure_boot: bool,
}
pub mod tpu_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 TpuClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TpuClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> TpuClient<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,
) -> TpuClient<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,
{
TpuClient::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
}
pub async fn list_nodes(
&mut self,
request: impl tonic::IntoRequest<super::ListNodesRequest>,
) -> Result<tonic::Response<super::ListNodesResponse>, 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.cloud.tpu.v2alpha1.Tpu/ListNodes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_node(
&mut self,
request: impl tonic::IntoRequest<super::GetNodeRequest>,
) -> Result<tonic::Response<super::Node>, 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.cloud.tpu.v2alpha1.Tpu/GetNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_node(
&mut self,
request: impl tonic::IntoRequest<super::CreateNodeRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/CreateNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_node(
&mut self,
request: impl tonic::IntoRequest<super::DeleteNodeRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/DeleteNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn stop_node(
&mut self,
request: impl tonic::IntoRequest<super::StopNodeRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/StopNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn start_node(
&mut self,
request: impl tonic::IntoRequest<super::StartNodeRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/StartNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_node(
&mut self,
request: impl tonic::IntoRequest<super::UpdateNodeRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/UpdateNode",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_queued_resources(
&mut self,
request: impl tonic::IntoRequest<super::ListQueuedResourcesRequest>,
) -> Result<tonic::Response<super::ListQueuedResourcesResponse>, 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.cloud.tpu.v2alpha1.Tpu/ListQueuedResources",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_queued_resource(
&mut self,
request: impl tonic::IntoRequest<super::GetQueuedResourceRequest>,
) -> Result<tonic::Response<super::QueuedResource>, 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.cloud.tpu.v2alpha1.Tpu/GetQueuedResource",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_queued_resource(
&mut self,
request: impl tonic::IntoRequest<super::CreateQueuedResourceRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/CreateQueuedResource",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_queued_resource(
&mut self,
request: impl tonic::IntoRequest<super::DeleteQueuedResourceRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/DeleteQueuedResource",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn generate_service_identity(
&mut self,
request: impl tonic::IntoRequest<super::GenerateServiceIdentityRequest>,
) -> Result<
tonic::Response<super::GenerateServiceIdentityResponse>,
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.cloud.tpu.v2alpha1.Tpu/GenerateServiceIdentity",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_accelerator_types(
&mut self,
request: impl tonic::IntoRequest<super::ListAcceleratorTypesRequest>,
) -> Result<
tonic::Response<super::ListAcceleratorTypesResponse>,
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.cloud.tpu.v2alpha1.Tpu/ListAcceleratorTypes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_accelerator_type(
&mut self,
request: impl tonic::IntoRequest<super::GetAcceleratorTypeRequest>,
) -> Result<tonic::Response<super::AcceleratorType>, 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.cloud.tpu.v2alpha1.Tpu/GetAcceleratorType",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_runtime_versions(
&mut self,
request: impl tonic::IntoRequest<super::ListRuntimeVersionsRequest>,
) -> Result<tonic::Response<super::ListRuntimeVersionsResponse>, 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.cloud.tpu.v2alpha1.Tpu/ListRuntimeVersions",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_runtime_version(
&mut self,
request: impl tonic::IntoRequest<super::GetRuntimeVersionRequest>,
) -> Result<tonic::Response<super::RuntimeVersion>, 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.cloud.tpu.v2alpha1.Tpu/GetRuntimeVersion",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_guest_attributes(
&mut self,
request: impl tonic::IntoRequest<super::GetGuestAttributesRequest>,
) -> Result<tonic::Response<super::GetGuestAttributesResponse>, 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.cloud.tpu.v2alpha1.Tpu/GetGuestAttributes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn simulate_maintenance_event(
&mut self,
request: impl tonic::IntoRequest<super::SimulateMaintenanceEventRequest>,
) -> 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.cloud.tpu.v2alpha1.Tpu/SimulateMaintenanceEvent",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}