@@ -7,24 +7,19 @@ import Foundation
77#endif
88
99public enum DestinationInput : Codable , JSONEncodable , AbstractEncodable {
10- case destinationIndexPrefix( DestinationIndexPrefix )
1110 case destinationIndexName( DestinationIndexName )
1211
1312 public func encode( to encoder: Encoder ) throws {
1413 var container = encoder. singleValueContainer ( )
1514 switch self {
16- case let . destinationIndexPrefix( value) :
17- try container. encode ( value)
1815 case let . destinationIndexName( value) :
1916 try container. encode ( value)
2017 }
2118 }
2219
2320 public init ( from decoder: Decoder ) throws {
2421 let container = try decoder. singleValueContainer ( )
25- if let value = try ? container. decode ( DestinationIndexPrefix . self) {
26- self = . destinationIndexPrefix( value)
27- } else if let value = try ? container. decode ( DestinationIndexName . self) {
22+ if let value = try ? container. decode ( DestinationIndexName . self) {
2823 self = . destinationIndexName( value)
2924 } else {
3025 throw DecodingError . typeMismatch (
@@ -36,8 +31,6 @@ public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable {
3631
3732 public func GetActualInstance( ) -> Encodable {
3833 switch self {
39- case let . destinationIndexPrefix( value) :
40- value as DestinationIndexPrefix
4134 case let . destinationIndexName( value) :
4235 value as DestinationIndexName
4336 }
0 commit comments