#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
#[derive(PartialEq,Clone,Default)]
pub struct Status {
pub code: Status_Code,
pub resources: ::std::string::String,
pub notes: ::std::string::String,
pub last_test_suite_run: ::protobuf::SingularPtrField<super::test_suite::TestSuite>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Status {
fn default() -> &'a Status {
<Status as ::protobuf::Message>::default_instance()
}
}
impl Status {
pub fn new() -> Status {
::std::default::Default::default()
}
pub fn get_code(&self) -> Status_Code {
self.code
}
pub fn clear_code(&mut self) {
self.code = Status_Code::UNKNOWN;
}
pub fn set_code(&mut self, v: Status_Code) {
self.code = v;
}
pub fn get_resources(&self) -> &str {
&self.resources
}
pub fn clear_resources(&mut self) {
self.resources.clear();
}
pub fn set_resources(&mut self, v: ::std::string::String) {
self.resources = v;
}
pub fn mut_resources(&mut self) -> &mut ::std::string::String {
&mut self.resources
}
pub fn take_resources(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.resources, ::std::string::String::new())
}
pub fn get_notes(&self) -> &str {
&self.notes
}
pub fn clear_notes(&mut self) {
self.notes.clear();
}
pub fn set_notes(&mut self, v: ::std::string::String) {
self.notes = v;
}
pub fn mut_notes(&mut self) -> &mut ::std::string::String {
&mut self.notes
}
pub fn take_notes(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.notes, ::std::string::String::new())
}
pub fn get_last_test_suite_run(&self) -> &super::test_suite::TestSuite {
self.last_test_suite_run.as_ref().unwrap_or_else(|| super::test_suite::TestSuite::default_instance())
}
pub fn clear_last_test_suite_run(&mut self) {
self.last_test_suite_run.clear();
}
pub fn has_last_test_suite_run(&self) -> bool {
self.last_test_suite_run.is_some()
}
pub fn set_last_test_suite_run(&mut self, v: super::test_suite::TestSuite) {
self.last_test_suite_run = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_last_test_suite_run(&mut self) -> &mut super::test_suite::TestSuite {
if self.last_test_suite_run.is_none() {
self.last_test_suite_run.set_default();
}
self.last_test_suite_run.as_mut().unwrap()
}
pub fn take_last_test_suite_run(&mut self) -> super::test_suite::TestSuite {
self.last_test_suite_run.take().unwrap_or_else(|| super::test_suite::TestSuite::new())
}
}
impl ::protobuf::Message for Status {
fn is_initialized(&self) -> bool {
for v in &self.last_test_suite_run {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)?
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resources)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.notes)?;
},
5 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_test_suite_run)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.code != Status_Code::UNKNOWN {
my_size += ::protobuf::rt::enum_size(1, self.code);
}
if !self.resources.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.resources);
}
if !self.notes.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.notes);
}
if let Some(ref v) = self.last_test_suite_run.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.code != Status_Code::UNKNOWN {
os.write_enum(1, self.code.value())?;
}
if !self.resources.is_empty() {
os.write_string(3, &self.resources)?;
}
if !self.notes.is_empty() {
os.write_string(4, &self.notes)?;
}
if let Some(ref v) = self.last_test_suite_run.as_ref() {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Status {
Status::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Status_Code>>(
"code",
|m: &Status| { &m.code },
|m: &mut Status| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"resources",
|m: &Status| { &m.resources },
|m: &mut Status| { &mut m.resources },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"notes",
|m: &Status| { &m.notes },
|m: &mut Status| { &mut m.notes },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::test_suite::TestSuite>>(
"last_test_suite_run",
|m: &Status| { &m.last_test_suite_run },
|m: &mut Status| { &mut m.last_test_suite_run },
));
::protobuf::reflect::MessageDescriptor::new::<Status>(
"Status",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Status {
static mut instance: ::protobuf::lazy::Lazy<Status> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Status,
};
unsafe {
instance.get(Status::new)
}
}
}
impl ::protobuf::Clear for Status {
fn clear(&mut self) {
self.code = Status_Code::UNKNOWN;
self.resources.clear();
self.notes.clear();
self.last_test_suite_run.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Status {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Status {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Status_Code {
UNKNOWN = 0,
DEPLOYED = 1,
DELETED = 2,
SUPERSEDED = 3,
FAILED = 4,
DELETING = 5,
PENDING_INSTALL = 6,
PENDING_UPGRADE = 7,
PENDING_ROLLBACK = 8,
}
impl ::protobuf::ProtobufEnum for Status_Code {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Status_Code> {
match value {
0 => ::std::option::Option::Some(Status_Code::UNKNOWN),
1 => ::std::option::Option::Some(Status_Code::DEPLOYED),
2 => ::std::option::Option::Some(Status_Code::DELETED),
3 => ::std::option::Option::Some(Status_Code::SUPERSEDED),
4 => ::std::option::Option::Some(Status_Code::FAILED),
5 => ::std::option::Option::Some(Status_Code::DELETING),
6 => ::std::option::Option::Some(Status_Code::PENDING_INSTALL),
7 => ::std::option::Option::Some(Status_Code::PENDING_UPGRADE),
8 => ::std::option::Option::Some(Status_Code::PENDING_ROLLBACK),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Status_Code] = &[
Status_Code::UNKNOWN,
Status_Code::DEPLOYED,
Status_Code::DELETED,
Status_Code::SUPERSEDED,
Status_Code::FAILED,
Status_Code::DELETING,
Status_Code::PENDING_INSTALL,
Status_Code::PENDING_UPGRADE,
Status_Code::PENDING_ROLLBACK,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("Status_Code", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for Status_Code {
}
impl ::std::default::Default for Status_Code {
fn default() -> Self {
Status_Code::UNKNOWN
}
}
impl ::protobuf::reflect::ProtobufValue for Status_Code {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x19hapi/release/status.proto\x12\x0chapi.release\x1a\x1dhapi/release/\
test_suite.proto\x1a\x19google/protobuf/any.proto\"\xce\x02\n\x06Status\
\x12-\n\x04code\x18\x01\x20\x01(\x0e2\x19.hapi.release.Status.CodeR\x04c\
ode\x12\x1c\n\tresources\x18\x03\x20\x01(\tR\tresources\x12\x14\n\x05not\
es\x18\x04\x20\x01(\tR\x05notes\x12F\n\x13last_test_suite_run\x18\x05\
\x20\x01(\x0b2\x17.hapi.release.TestSuiteR\x10lastTestSuiteRun\"\x98\x01\
\n\x04Code\x12\x0b\n\x07UNKNOWN\x10\0\x12\x0c\n\x08DEPLOYED\x10\x01\x12\
\x0b\n\x07DELETED\x10\x02\x12\x0e\n\nSUPERSEDED\x10\x03\x12\n\n\x06FAILE\
D\x10\x04\x12\x0c\n\x08DELETING\x10\x05\x12\x13\n\x0fPENDING_INSTALL\x10\
\x06\x12\x13\n\x0fPENDING_UPGRADE\x10\x07\x12\x14\n\x10PENDING_ROLLBACK\
\x10\x08B\tZ\x07releaseb\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}