1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_SERVER_WINDOWCONTAINERTHUMBNAIL_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_SERVER_WINDOWCONTAINERTHUMBNAIL_PROTO_H_
5 
6 #include <stddef.h>
7 #include <stdint.h>
8 
9 #include "perfetto/protozero/field_writer.h"
10 #include "perfetto/protozero/message.h"
11 #include "perfetto/protozero/packed_repeated_fields.h"
12 #include "perfetto/protozero/proto_decoder.h"
13 #include "perfetto/protozero/proto_utils.h"
14 
15 namespace perfetto {
16 namespace protos {
17 namespace pbzero {
18 class SurfaceAnimatorProto;
19 } // Namespace pbzero.
20 } // Namespace protos.
21 } // Namespace perfetto.
22 
23 namespace perfetto {
24 namespace protos {
25 namespace pbzero {
26 
27 class WindowContainerThumbnailProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/3, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
28  public:
WindowContainerThumbnailProto_Decoder(const uint8_t * data,size_t len)29   WindowContainerThumbnailProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
WindowContainerThumbnailProto_Decoder(const std::string & raw)30   explicit WindowContainerThumbnailProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
WindowContainerThumbnailProto_Decoder(const::protozero::ConstBytes & raw)31   explicit WindowContainerThumbnailProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_width()32   bool has_width() const { return at<1>().valid(); }
width()33   int32_t width() const { return at<1>().as_int32(); }
has_height()34   bool has_height() const { return at<2>().valid(); }
height()35   int32_t height() const { return at<2>().as_int32(); }
has_surface_animator()36   bool has_surface_animator() const { return at<3>().valid(); }
surface_animator()37   ::protozero::ConstBytes surface_animator() const { return at<3>().as_bytes(); }
38 };
39 
40 class WindowContainerThumbnailProto : public ::protozero::Message {
41  public:
42   using Decoder = WindowContainerThumbnailProto_Decoder;
43   enum : int32_t {
44     kWidthFieldNumber = 1,
45     kHeightFieldNumber = 2,
46     kSurfaceAnimatorFieldNumber = 3,
47   };
GetName()48   static constexpr const char* GetName() { return ".perfetto.protos.WindowContainerThumbnailProto"; }
49 
50 
51   using FieldMetadata_Width =
52     ::protozero::proto_utils::FieldMetadata<
53       1,
54       ::protozero::proto_utils::RepetitionType::kNotRepeated,
55       ::protozero::proto_utils::ProtoSchemaType::kInt32,
56       int32_t,
57       WindowContainerThumbnailProto>;
58 
59   static constexpr FieldMetadata_Width kWidth{};
set_width(int32_t value)60   void set_width(int32_t value) {
61     static constexpr uint32_t field_id = FieldMetadata_Width::kFieldId;
62     // Call the appropriate protozero::Message::Append(field_id, ...)
63     // method based on the type of the field.
64     ::protozero::internal::FieldWriter<
65       ::protozero::proto_utils::ProtoSchemaType::kInt32>
66         ::Append(*this, field_id, value);
67   }
68 
69   using FieldMetadata_Height =
70     ::protozero::proto_utils::FieldMetadata<
71       2,
72       ::protozero::proto_utils::RepetitionType::kNotRepeated,
73       ::protozero::proto_utils::ProtoSchemaType::kInt32,
74       int32_t,
75       WindowContainerThumbnailProto>;
76 
77   static constexpr FieldMetadata_Height kHeight{};
set_height(int32_t value)78   void set_height(int32_t value) {
79     static constexpr uint32_t field_id = FieldMetadata_Height::kFieldId;
80     // Call the appropriate protozero::Message::Append(field_id, ...)
81     // method based on the type of the field.
82     ::protozero::internal::FieldWriter<
83       ::protozero::proto_utils::ProtoSchemaType::kInt32>
84         ::Append(*this, field_id, value);
85   }
86 
87   using FieldMetadata_SurfaceAnimator =
88     ::protozero::proto_utils::FieldMetadata<
89       3,
90       ::protozero::proto_utils::RepetitionType::kNotRepeated,
91       ::protozero::proto_utils::ProtoSchemaType::kMessage,
92       SurfaceAnimatorProto,
93       WindowContainerThumbnailProto>;
94 
95   static constexpr FieldMetadata_SurfaceAnimator kSurfaceAnimator{};
set_surface_animator()96   template <typename T = SurfaceAnimatorProto> T* set_surface_animator() {
97     return BeginNestedMessage<T>(3);
98   }
99 
100 };
101 
102 } // Namespace.
103 } // Namespace.
104 } // Namespace.
105 #endif  // Include guard.
106