Skip to content

Commit

Permalink
fix(notifications/googlechat): Fix field visibility. (#622) (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
spinnakerbot authored and Matt Duftler committed Aug 14, 2019
1 parent 4aae0bc commit 6160b79
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class GoogleChatMessage {
"https://avatars0.githubusercontent.com/u/7634182?s=200&v=4";
static transient String SPINNAKER_FRONT_PAGE_URL = "https://www.spinnaker.io/";

Card cards;
public Card cards;

transient String message;

Expand All @@ -37,15 +37,15 @@ public GoogleChatMessage(String message) {

/** Classes below are used to build the JSON object for the Chat API. * */
class Card {
List<Section> sections = new ArrayList<>();
public List<Section> sections = new ArrayList<>();

public Card() {
sections.add(new Section());
}
}

class Section {
List<Object> widgets = new ArrayList<>();
public List<Object> widgets = new ArrayList<>();

public Section() {
widgets.add(new TextParagraphWidget());
Expand All @@ -54,15 +54,15 @@ public Section() {
}

class TextParagraphWidget {
HashMap<String, String> textParagraph = new HashMap<>();
public HashMap<String, String> textParagraph = new HashMap<>();

public TextParagraphWidget() {
textParagraph.put("text", message);
}
}

class ButtonWidget {
List<Object> buttons = new ArrayList<>();
public List<Object> buttons = new ArrayList<>();

public ButtonWidget() {
buttons.add(new ImageButtonWidget());
Expand All @@ -71,33 +71,33 @@ public ButtonWidget() {
}

class ImageButtonWidget {
ImageButton imageButton = new ImageButton();
public ImageButton imageButton = new ImageButton();
}

class ImageButton {
String iconUrl = SPINNAKER_ICON_URL;
OnClick onClick = new OnClick(SPINNAKER_FRONT_PAGE_URL);
public String iconUrl = SPINNAKER_ICON_URL;
public OnClick onClick = new OnClick(SPINNAKER_FRONT_PAGE_URL);
}

class TextButtonWidget {
TextButton textButton = new TextButton();
public TextButton textButton = new TextButton();
}

class TextButton {
String text = "From Spinnaker";
OnClick onClick = new OnClick(SPINNAKER_FRONT_PAGE_URL);
public String text = "From Spinnaker";
public OnClick onClick = new OnClick(SPINNAKER_FRONT_PAGE_URL);
}

class OnClick {
OpenLink openLink;
public OpenLink openLink;

public OnClick(String link) {
openLink = new OpenLink(link);
}
}

class OpenLink {
String url;
public String url;

public OpenLink(String link) {
url = link;
Expand Down

0 comments on commit 6160b79

Please sign in to comment.