Skip to content

Commit

Permalink
Update Greengrass IPC (#590)
Browse files Browse the repository at this point in the history
* Add refresh field to GetSecretValueRequest
  • Loading branch information
sfod authored Jul 12, 2024
1 parent 211ede1 commit 16bcc94
Showing 1 changed file with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package software.amazon.awssdk.aws.greengrass.model;

import com.google.gson.annotations.Expose;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
Expand Down Expand Up @@ -47,10 +48,17 @@ public boolean isVoid() {
)
private Optional<String> versionStage;

@Expose(
serialize = true,
deserialize = true
)
private Optional<Boolean> refresh;

public GetSecretValueRequest() {
this.secretId = Optional.empty();
this.versionId = Optional.empty();
this.versionStage = Optional.empty();
this.refresh = Optional.empty();
}

/**
Expand Down Expand Up @@ -128,6 +136,31 @@ public GetSecretValueRequest withVersionStage(final String versionStage) {
return this;
}

/**
* (Optional) Whether to fetch the latest secret from cloud when the request is handled. Defaults to false.
*/
public Boolean isRefresh() {
if (refresh.isPresent()) {
return refresh.get();
}
return null;
}

/**
* (Optional) Whether to fetch the latest secret from cloud when the request is handled. Defaults to false.
*/
public void setRefresh(final Boolean refresh) {
this.refresh = Optional.ofNullable(refresh);
}

/**
* (Optional) Whether to fetch the latest secret from cloud when the request is handled. Defaults to false.
*/
public GetSecretValueRequest withRefresh(final Boolean refresh) {
setRefresh(refresh);
return this;
}

@Override
public String getApplicationModelType() {
return APPLICATION_MODEL_TYPE;
Expand All @@ -143,11 +176,12 @@ public boolean equals(Object rhs) {
isEquals = isEquals && this.secretId.equals(other.secretId);
isEquals = isEquals && this.versionId.equals(other.versionId);
isEquals = isEquals && this.versionStage.equals(other.versionStage);
isEquals = isEquals && this.refresh.equals(other.refresh);
return isEquals;
}

@Override
public int hashCode() {
return Objects.hash(secretId, versionId, versionStage);
return Objects.hash(secretId, versionId, versionStage, refresh);
}
}

0 comments on commit 16bcc94

Please # to comment.