// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Album.java
// public static enum Privacy {EVERYONE, FRIENDS_OF_FRIENDS, FRIENDS, CUSTOM}
// 
// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Album.java
// public static enum Type {NORMAL, MOBILE, PROFILE, WALL, FRIENDS_WALLS, UNKNOWN}
// 
// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Reference.java
// @SuppressWarnings("serial")
// public class Reference implements Identifiable, Nameable {
// 
//     private final String id;
//     private final String name;
// 
//     public Reference(String id) {
//         this(id, null);
//     }
// 
//     public Reference(String id, String name) {
//         this.id = id;
//         this.name = name;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }


import java.util.Date;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.agorava.facebook.model.Album.Privacy;
import org.agorava.facebook.model.Album.Type;
import org.agorava.facebook.model.Reference;
import java.io.IOException;
/*
 * Copyright 2013 Agorava
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package org.agorava.facebook.jackson;



/**
 * Annotated mixin to add Jackson annotations to Album.
 *
 * @author Craig Walls
 */
@JsonIgnoreProperties(ignoreUnknown = true)
abstract class AlbumMixin {

    @JsonCreator
    AlbumMixin(@JsonProperty("id") String id, @JsonProperty("from") Reference from, @JsonProperty("name") String name,
               @JsonProperty("type") @JsonDeserialize(using = TypeDeserializer.class) Type type,
               @JsonProperty("link") String link, @JsonProperty("count") int count,
               @JsonProperty("privacy") @JsonDeserialize(using = PrivacyDeserializer.class) Privacy privacy,
               @JsonProperty("created_time") Date createdTime) {
    }

    @JsonProperty("location")
    String location;

    @JsonProperty("description")
    String description;

    @JsonProperty("updated_time")
    Date updatedTime;

    @JsonProperty("cover_photo")
    String coverPhotoId;

// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Album.java
// public static enum Privacy {EVERYONE, FRIENDS_OF_FRIENDS, FRIENDS, CUSTOM}
// 
// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Album.java
// public static enum Type {NORMAL, MOBILE, PROFILE, WALL, FRIENDS_WALLS, UNKNOWN}
// 
// Path: agorava-facebook-api/src/main/java/org/agorava/facebook/model/Reference.java
// @SuppressWarnings("serial")
// public class Reference implements Identifiable, Nameable {
// 
//     private final String id;
//     private final String name;
// 
//     public Reference(String id) {
//         this(id, null);
//     }
// 
//     public Reference(String id, String name) {
//         this.id = id;
//         this.name = name;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }


// Path: agorava-facebook-cdi/src/main/java/org/agorava/facebook/jackson/AlbumMixin.java
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.agorava.facebook.model.Album.Privacy;
import org.agorava.facebook.model.Album.Type;
import org.agorava.facebook.model.Reference;
import java.io.IOException;

/*
 * Copyright 2013 Agorava
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package org.agorava.facebook.jackson;



/**
 * Annotated mixin to add Jackson annotations to Album.
 *
 * @author Craig Walls
 */
@JsonIgnoreProperties(ignoreUnknown = true)
abstract class AlbumMixin {

    @JsonCreator
    AlbumMixin(@JsonProperty("id") String id, @JsonProperty("from") Reference from, @JsonProperty("name") String name,
               @JsonProperty("type") @JsonDeserialize(using = TypeDeserializer.class) Type type,
               @JsonProperty("link") String link, @JsonProperty("count") int count,
               @JsonProperty("privacy") @JsonDeserialize(using = PrivacyDeserializer.class) Privacy privacy,
               @JsonProperty("created_time") Date createdTime) {
    }

    @JsonProperty("location")
    String location;

    @JsonProperty("description")
    String description;

    @JsonProperty("updated_time")
    Date updatedTime;

    @JsonProperty("cover_photo")
    String coverPhotoId;

    private static class TypeDeserializer extends JsonDeserializer<Type> {