     }
 
 }
+// [END codable_struct]

    }
}

public struct City: Decodable {

    let name: String
    let state: String?

            }
        }
        // [END set_document]
    }

    private func setDocumentWithCodable() {
        // [START set_document_codable]
        let city = City(name: "Los Angeles",
                        state: "CA",
                        country: "USA",
                        isCapital: false,
                        population: 5000000)

        do {
            try db.collection("cities").document("LA").setData(from: city)
        } catch let error {
            print("Error writing city to Firestore: \(error)")
        }
        // [END set_document_codable]
    }

    private func dataTypes() {
