-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #50: Add Available Services API call
- Loading branch information
Dan Torrey
committed
Jun 13, 2019
1 parent
4931756
commit 280b925
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/org/graylog/integrations/aws/resources/responses/AvailableAWSService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.graylog.integrations.aws.resources.responses; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.auto.value.AutoValue; | ||
import org.graylog.autovalue.WithBeanGetter; | ||
|
||
@JsonAutoDetect | ||
@AutoValue | ||
@WithBeanGetter | ||
public abstract class AvailableAWSService { | ||
|
||
private static final String NAME = "name"; | ||
private static final String DESCRIPTION = "description"; | ||
private static final String POLICY = "policy"; | ||
private static final String HELPER_TEXT = "helper_text"; | ||
private static final String LEARN_MORE_LINK = "learn_more_link"; | ||
|
||
@JsonProperty(NAME) | ||
public abstract String name(); | ||
|
||
@JsonProperty(DESCRIPTION) | ||
public abstract String description(); | ||
|
||
@JsonProperty(POLICY) | ||
public abstract String policy(); | ||
|
||
@JsonProperty(HELPER_TEXT) | ||
public abstract String helperText(); | ||
|
||
@JsonProperty(LEARN_MORE_LINK) | ||
public abstract String LearnMoreLink(); | ||
|
||
public static AvailableAWSService create(@JsonProperty(NAME) String name, | ||
@JsonProperty(DESCRIPTION) String description, | ||
@JsonProperty(POLICY) String policy, | ||
@JsonProperty(HELPER_TEXT) String helperText, | ||
@JsonProperty(LEARN_MORE_LINK) String LearnMoreLink) { | ||
return new AutoValue_AvailableAWSService(name, description, policy, helperText, LearnMoreLink); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...in/java/org/graylog/integrations/aws/resources/responses/AvailableAWSServiceSummmary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.graylog.integrations.aws.resources.responses; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.auto.value.AutoValue; | ||
import org.graylog.autovalue.WithBeanGetter; | ||
|
||
import java.util.List; | ||
|
||
@JsonAutoDetect | ||
@AutoValue | ||
@WithBeanGetter | ||
public abstract class AvailableAWSServiceSummmary { | ||
|
||
private static final String SERVICES = "services"; | ||
private static final String TOTAL = "total"; | ||
|
||
@JsonProperty(SERVICES) | ||
public abstract List<AvailableAWSService> services(); | ||
|
||
@JsonProperty(TOTAL) | ||
public abstract long total(); | ||
|
||
public static AvailableAWSServiceSummmary create(@JsonProperty(SERVICES) List<AvailableAWSService> services, | ||
@JsonProperty(TOTAL) long total) { | ||
return new AutoValue_AvailableAWSServiceSummmary(services, total); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters