public MovieIndexCreateRequest(string id, Movie movie)
        {
            if (movie == null)
            {
                throw new ArgumentNullException("movie");
            }

            Id = id;
            Name = movie.Name;
            Url = movie.Url;
            Image = movie.Image;
            Rating = movie.Rating;
            Year = movie.Year;
            Episode = movie.Episode;
            NbVoters = movie.NbVoters;
            Rank = movie.Rank;
        }
        static MovieIndexCreateRequest GetMovieIndexCreateRequest(IDictionary<string, object> values)
        {
            // If contains rating, this is a movie.
            if (values.ContainsKey("rating"))
            {
                Movie movie;
                try
                {
                    movie = new Movie(values);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Unable to create a Movie object. Skipping.");
                    movie = null;
                }

                if (movie != null)
                {
                    string id = Guid.NewGuid().ToString();
                    return new MovieIndexCreateRequest(id, movie);
                }
            }

            return null;
        }