@@ -56,6 +56,7 @@ extension Screen : Proto2Codable {
5656 case 3 : screen = . screen_oneof_sub_message( try protoReader. decode ( Screen . SubMessage. self) )
5757 case 4 : screen = . `self`( try protoReader. decode ( Screen . Self_. self) )
5858 case 5 : view = . view_oneof_string( try protoReader. decode ( String . self) )
59+ case 6 : view = . container( try protoReader. decode ( String . self) )
5960 default : try protoReader. readUnknownField ( tag: tag)
6061 }
6162 }
@@ -81,46 +82,49 @@ extension Screen : Proto2Codable {
8182extension Screen : Codable {
8283
8384 public init ( from decoder: Decoder ) throws {
84- let container = try decoder. container ( keyedBy: StringLiteralCodingKeys . self)
85- if let screen_oneof_string = try container . decodeIfPresent ( String . self, forKey: " screenOneofString " ) {
85+ let _container = try decoder. container ( keyedBy: StringLiteralCodingKeys . self)
86+ if let screen_oneof_string = try _container . decodeIfPresent ( String . self, forKey: " screenOneofString " ) {
8687 self . screen = . screen_oneof_string( screen_oneof_string)
87- } else if let screen_oneof_string = try container . decodeIfPresent ( String . self, forKey: " screen_oneof_string " ) {
88+ } else if let screen_oneof_string = try _container . decodeIfPresent ( String . self, forKey: " screen_oneof_string " ) {
8889 self . screen = . screen_oneof_string( screen_oneof_string)
89- } else if let screen_oneof_int32 = try container . decodeIfPresent ( Int32 . self, forKey: " screenOneofInt32 " ) {
90+ } else if let screen_oneof_int32 = try _container . decodeIfPresent ( Int32 . self, forKey: " screenOneofInt32 " ) {
9091 self . screen = . screen_oneof_int32( screen_oneof_int32)
91- } else if let screen_oneof_int32 = try container . decodeIfPresent ( Int32 . self, forKey: " screen_oneof_int32 " ) {
92+ } else if let screen_oneof_int32 = try _container . decodeIfPresent ( Int32 . self, forKey: " screen_oneof_int32 " ) {
9293 self . screen = . screen_oneof_int32( screen_oneof_int32)
93- } else if let screen_oneof_sub_message = try container . decodeIfPresent ( Screen . SubMessage. self, forKey: " screenOneofSubMessage " ) {
94+ } else if let screen_oneof_sub_message = try _container . decodeIfPresent ( Screen . SubMessage. self, forKey: " screenOneofSubMessage " ) {
9495 self . screen = . screen_oneof_sub_message( screen_oneof_sub_message)
95- } else if let screen_oneof_sub_message = try container . decodeIfPresent ( Screen . SubMessage. self, forKey: " screen_oneof_sub_message " ) {
96+ } else if let screen_oneof_sub_message = try _container . decodeIfPresent ( Screen . SubMessage. self, forKey: " screen_oneof_sub_message " ) {
9697 self . screen = . screen_oneof_sub_message( screen_oneof_sub_message)
97- } else if let self_ = try container . decodeIfPresent ( Screen . Self_. self, forKey: " self " ) {
98+ } else if let self_ = try _container . decodeIfPresent ( Screen . Self_. self, forKey: " self " ) {
9899 self . screen = . `self`( self_)
99100 } else {
100101 self . screen = nil
101102 }
102- if let view_oneof_string = try container . decodeIfPresent ( String . self, forKey: " viewOneofString " ) {
103+ if let view_oneof_string = try _container . decodeIfPresent ( String . self, forKey: " viewOneofString " ) {
103104 self . view = . view_oneof_string( view_oneof_string)
104- } else if let view_oneof_string = try container . decodeIfPresent ( String . self, forKey: " view_oneof_string " ) {
105+ } else if let view_oneof_string = try _container . decodeIfPresent ( String . self, forKey: " view_oneof_string " ) {
105106 self . view = . view_oneof_string( view_oneof_string)
107+ } else if let container = try _container. decodeIfPresent ( String . self, forKey: " container " ) {
108+ self . view = . container( container)
106109 } else {
107110 self . view = nil
108111 }
109112 }
110113
111114 public func encode( to encoder: Encoder ) throws {
112- var container = encoder. container ( keyedBy: StringLiteralCodingKeys . self)
115+ var _container = encoder. container ( keyedBy: StringLiteralCodingKeys . self)
113116 let preferCamelCase = encoder. protoKeyNameEncodingStrategy == . camelCase
114117
115118 switch self . screen {
116- case . screen_oneof_string( let screen_oneof_string) : try container . encode ( screen_oneof_string, forKey: preferCamelCase ? " screenOneofString " : " screen_oneof_string " )
117- case . screen_oneof_int32( let screen_oneof_int32) : try container . encode ( screen_oneof_int32, forKey: preferCamelCase ? " screenOneofInt32 " : " screen_oneof_int32 " )
118- case . screen_oneof_sub_message( let screen_oneof_sub_message) : try container . encode ( screen_oneof_sub_message, forKey: preferCamelCase ? " screenOneofSubMessage " : " screen_oneof_sub_message " )
119- case . `self`( let `self`) : try container . encode ( `self`, forKey: " self " )
119+ case . screen_oneof_string( let screen_oneof_string) : try _container . encode ( screen_oneof_string, forKey: preferCamelCase ? " screenOneofString " : " screen_oneof_string " )
120+ case . screen_oneof_int32( let screen_oneof_int32) : try _container . encode ( screen_oneof_int32, forKey: preferCamelCase ? " screenOneofInt32 " : " screen_oneof_int32 " )
121+ case . screen_oneof_sub_message( let screen_oneof_sub_message) : try _container . encode ( screen_oneof_sub_message, forKey: preferCamelCase ? " screenOneofSubMessage " : " screen_oneof_sub_message " )
122+ case . `self`( let `self`) : try _container . encode ( `self`, forKey: " self " )
120123 case Optional . none: break
121124 }
122125 switch self . view {
123- case . view_oneof_string( let view_oneof_string) : try container. encode ( view_oneof_string, forKey: preferCamelCase ? " viewOneofString " : " view_oneof_string " )
126+ case . view_oneof_string( let view_oneof_string) : try _container. encode ( view_oneof_string, forKey: preferCamelCase ? " viewOneofString " : " view_oneof_string " )
127+ case . container( let container) : try _container. encode ( container, forKey: " container " )
124128 case Optional . none: break
125129 }
126130 }
@@ -154,10 +158,12 @@ extension Screen {
154158 public enum View {
155159
156160 case view_oneof_string( String )
161+ case container( String )
157162
158163 fileprivate func encode( to protoWriter: ProtoWriter ) throws {
159164 switch self {
160165 case . view_oneof_string( let view_oneof_string) : try protoWriter. encode ( tag: 5 , value: view_oneof_string)
166+ case . container( let container) : try protoWriter. encode ( tag: 6 , value: container)
161167 }
162168 }
163169
0 commit comments