|
| 1 | +package org.kohsuke.github; |
| 2 | + |
| 3 | +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; |
| 4 | + |
| 5 | +/** |
| 6 | + * Changes made to a repository. |
| 7 | + */ |
| 8 | +@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD" }, justification = "JSON API") |
| 9 | +public class GHRepositoryChanges { |
| 10 | + private FromRepository repository; |
| 11 | + private Owner owner; |
| 12 | + |
| 13 | + /** |
| 14 | + * Get outer owner object. |
| 15 | + * |
| 16 | + * @return Owner |
| 17 | + */ |
| 18 | + public Owner getOwner() { |
| 19 | + return owner; |
| 20 | + } |
| 21 | + |
| 22 | + /** |
| 23 | + * Outer object of owner from whom this repository was transferred. |
| 24 | + */ |
| 25 | + public static class Owner { |
| 26 | + private FromOwner from; |
| 27 | + |
| 28 | + /** |
| 29 | + * Get in owner object. |
| 30 | + * |
| 31 | + * @return FromOwner |
| 32 | + */ |
| 33 | + public FromOwner getFrom() { |
| 34 | + return from; |
| 35 | + } |
| 36 | + } |
| 37 | + |
| 38 | + /** |
| 39 | + * Owner from whom this repository was transferred. |
| 40 | + */ |
| 41 | + public static class FromOwner { |
| 42 | + private GHUser user; |
| 43 | + |
| 44 | + /** |
| 45 | + * Get user from which this repository was transferrred. |
| 46 | + * |
| 47 | + * @return user |
| 48 | + */ |
| 49 | + @SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected") |
| 50 | + public GHUser getUser() { |
| 51 | + return user; |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Get repository. |
| 57 | + * |
| 58 | + * @return FromRepository |
| 59 | + */ |
| 60 | + public FromRepository getRepository() { |
| 61 | + return repository; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Repository object from which the name was changed. |
| 66 | + */ |
| 67 | + public static class FromRepository { |
| 68 | + private FromName name; |
| 69 | + |
| 70 | + /** |
| 71 | + * Get top level object for the previous name of the repository. |
| 72 | + * |
| 73 | + * @return FromName |
| 74 | + */ |
| 75 | + public FromName getName() { |
| 76 | + return name; |
| 77 | + } |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Repository name that was changed. |
| 82 | + */ |
| 83 | + public static class FromName { |
| 84 | + private String from; |
| 85 | + |
| 86 | + /** |
| 87 | + * Get previous name of the repository before rename. |
| 88 | + * |
| 89 | + * @return String |
| 90 | + */ |
| 91 | + public String getFrom() { |
| 92 | + return from; |
| 93 | + } |
| 94 | + } |
| 95 | +} |
0 commit comments