This repository was archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAuthor.cs
47 lines (44 loc) · 2.06 KB
/
Author.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// ---------------------------------------------------------------
// Copyright (c) 2023 Planet Dotnet. All rights reserved.
// Licensed under the MIT License.
// See License.txt in the project root for license information.
// ---------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using PlanetDotnet.Authors.Models.GeoPositions;
namespace PlanetDotnet.Authors.Models.Authors
{
public class Author
{
[JsonProperty("firstName", Required = Required.DisallowNull)]
public string FirstName { get; set; }
[JsonProperty("lastName", Required = Required.DisallowNull)]
public string LastName { get; set; }
[JsonProperty("stateOrRegion", Required = Required.DisallowNull)]
public string StateOrRegion { get; set; }
[EmailAddress]
[JsonProperty("emailAddress", Required = Required.Always)]
public string EmailAddress { get; set; }
[JsonProperty("tagOrBio", Required = Required.DisallowNull)]
public string ShortBioOrTagLine { get; set; }
[Url]
[JsonProperty("webSite", Required = Required.Always)]
public Uri WebSite { get; set; }
[JsonProperty("twitterHandle", Required = Required.DisallowNull)]
public string TwitterHandle { get; set; }
[JsonProperty("githubHandle", Required = Required.Always)]
public string GitHubHandle { get; set; }
[JsonProperty("gravatarHash", Required = Required.DisallowNull)]
public string GravatarHash { get; set; }
[JsonProperty("feedUris", Required = Required.Always)]
public IEnumerable<Uri> FeedUris { get; set; }
[JsonProperty("position", Required = Required.DisallowNull)]
public GeoPosition Position { get; set; }
// In ISO 639-1, lowercase, 2 letters
// https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[JsonProperty("languageCode", Required = Required.Always)]
public string FeedLanguageCode { get; set; }
}
}