software.amazon.awssdk.services.signer.model.ListSigningJobsRequest Maven / Gradle / Ivy
Show all versions of signer Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.signer.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class ListSigningJobsRequest extends SignerRequest implements
ToCopyableBuilder {
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
.getter(getter(ListSigningJobsRequest::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("status").build()).build();
private static final SdkField PLATFORM_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("platformId").getter(getter(ListSigningJobsRequest::platformId)).setter(setter(Builder::platformId))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("platformId").build()).build();
private static final SdkField REQUESTED_BY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("requestedBy").getter(getter(ListSigningJobsRequest::requestedBy)).setter(setter(Builder::requestedBy))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("requestedBy").build()).build();
private static final SdkField MAX_RESULTS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("maxResults").getter(getter(ListSigningJobsRequest::maxResults)).setter(setter(Builder::maxResults))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("maxResults").build()).build();
private static final SdkField NEXT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("nextToken").getter(getter(ListSigningJobsRequest::nextToken)).setter(setter(Builder::nextToken))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("nextToken").build()).build();
private static final SdkField IS_REVOKED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("isRevoked").getter(getter(ListSigningJobsRequest::isRevoked)).setter(setter(Builder::isRevoked))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("isRevoked").build()).build();
private static final SdkField SIGNATURE_EXPIRES_BEFORE_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("signatureExpiresBefore")
.getter(getter(ListSigningJobsRequest::signatureExpiresBefore))
.setter(setter(Builder::signatureExpiresBefore))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("signatureExpiresBefore").build())
.build();
private static final SdkField SIGNATURE_EXPIRES_AFTER_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("signatureExpiresAfter").getter(getter(ListSigningJobsRequest::signatureExpiresAfter))
.setter(setter(Builder::signatureExpiresAfter))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("signatureExpiresAfter").build())
.build();
private static final SdkField JOB_INVOKER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("jobInvoker").getter(getter(ListSigningJobsRequest::jobInvoker)).setter(setter(Builder::jobInvoker))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("jobInvoker").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STATUS_FIELD,
PLATFORM_ID_FIELD, REQUESTED_BY_FIELD, MAX_RESULTS_FIELD, NEXT_TOKEN_FIELD, IS_REVOKED_FIELD,
SIGNATURE_EXPIRES_BEFORE_FIELD, SIGNATURE_EXPIRES_AFTER_FIELD, JOB_INVOKER_FIELD));
private final String status;
private final String platformId;
private final String requestedBy;
private final Integer maxResults;
private final String nextToken;
private final Boolean isRevoked;
private final Instant signatureExpiresBefore;
private final Instant signatureExpiresAfter;
private final String jobInvoker;
private ListSigningJobsRequest(BuilderImpl builder) {
super(builder);
this.status = builder.status;
this.platformId = builder.platformId;
this.requestedBy = builder.requestedBy;
this.maxResults = builder.maxResults;
this.nextToken = builder.nextToken;
this.isRevoked = builder.isRevoked;
this.signatureExpiresBefore = builder.signatureExpiresBefore;
this.signatureExpiresAfter = builder.signatureExpiresAfter;
this.jobInvoker = builder.jobInvoker;
}
/**
*
* A status value with which to filter your results.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link SigningStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return A status value with which to filter your results.
* @see SigningStatus
*/
public final SigningStatus status() {
return SigningStatus.fromValue(status);
}
/**
*
* A status value with which to filter your results.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link SigningStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return A status value with which to filter your results.
* @see SigningStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* The ID of microcontroller platform that you specified for the distribution of your code image.
*
*
* @return The ID of microcontroller platform that you specified for the distribution of your code image.
*/
public final String platformId() {
return platformId;
}
/**
*
* The IAM principal that requested the signing job.
*
*
* @return The IAM principal that requested the signing job.
*/
public final String requestedBy() {
return requestedBy;
}
/**
*
* Specifies the maximum number of items to return in the response. Use this parameter when paginating results. If
* additional items exist beyond the number you specify, the nextToken
element is set in the response.
* Use the nextToken
value in a subsequent request to retrieve additional items.
*
*
* @return Specifies the maximum number of items to return in the response. Use this parameter when paginating
* results. If additional items exist beyond the number you specify, the nextToken
element is
* set in the response. Use the nextToken
value in a subsequent request to retrieve additional
* items.
*/
public final Integer maxResults() {
return maxResults;
}
/**
*
* String for specifying the next set of paginated results to return. After you receive a response with truncated
* results, use this parameter in a subsequent request. Set it to the value of nextToken
from the
* response that you just received.
*
*
* @return String for specifying the next set of paginated results to return. After you receive a response with
* truncated results, use this parameter in a subsequent request. Set it to the value of
* nextToken
from the response that you just received.
*/
public final String nextToken() {
return nextToken;
}
/**
*
* Filters results to return only signing jobs with revoked signatures.
*
*
* @return Filters results to return only signing jobs with revoked signatures.
*/
public final Boolean isRevoked() {
return isRevoked;
}
/**
*
* Filters results to return only signing jobs with signatures expiring before a specified timestamp.
*
*
* @return Filters results to return only signing jobs with signatures expiring before a specified timestamp.
*/
public final Instant signatureExpiresBefore() {
return signatureExpiresBefore;
}
/**
*
* Filters results to return only signing jobs with signatures expiring after a specified timestamp.
*
*
* @return Filters results to return only signing jobs with signatures expiring after a specified timestamp.
*/
public final Instant signatureExpiresAfter() {
return signatureExpiresAfter;
}
/**
*
* Filters results to return only signing jobs initiated by a specified IAM entity.
*
*
* @return Filters results to return only signing jobs initiated by a specified IAM entity.
*/
public final String jobInvoker() {
return jobInvoker;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(platformId());
hashCode = 31 * hashCode + Objects.hashCode(requestedBy());
hashCode = 31 * hashCode + Objects.hashCode(maxResults());
hashCode = 31 * hashCode + Objects.hashCode(nextToken());
hashCode = 31 * hashCode + Objects.hashCode(isRevoked());
hashCode = 31 * hashCode + Objects.hashCode(signatureExpiresBefore());
hashCode = 31 * hashCode + Objects.hashCode(signatureExpiresAfter());
hashCode = 31 * hashCode + Objects.hashCode(jobInvoker());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ListSigningJobsRequest)) {
return false;
}
ListSigningJobsRequest other = (ListSigningJobsRequest) obj;
return Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(platformId(), other.platformId())
&& Objects.equals(requestedBy(), other.requestedBy()) && Objects.equals(maxResults(), other.maxResults())
&& Objects.equals(nextToken(), other.nextToken()) && Objects.equals(isRevoked(), other.isRevoked())
&& Objects.equals(signatureExpiresBefore(), other.signatureExpiresBefore())
&& Objects.equals(signatureExpiresAfter(), other.signatureExpiresAfter())
&& Objects.equals(jobInvoker(), other.jobInvoker());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("ListSigningJobsRequest").add("Status", statusAsString()).add("PlatformId", platformId())
.add("RequestedBy", requestedBy()).add("MaxResults", maxResults()).add("NextToken", nextToken())
.add("IsRevoked", isRevoked()).add("SignatureExpiresBefore", signatureExpiresBefore())
.add("SignatureExpiresAfter", signatureExpiresAfter()).add("JobInvoker", jobInvoker()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "platformId":
return Optional.ofNullable(clazz.cast(platformId()));
case "requestedBy":
return Optional.ofNullable(clazz.cast(requestedBy()));
case "maxResults":
return Optional.ofNullable(clazz.cast(maxResults()));
case "nextToken":
return Optional.ofNullable(clazz.cast(nextToken()));
case "isRevoked":
return Optional.ofNullable(clazz.cast(isRevoked()));
case "signatureExpiresBefore":
return Optional.ofNullable(clazz.cast(signatureExpiresBefore()));
case "signatureExpiresAfter":
return Optional.ofNullable(clazz.cast(signatureExpiresAfter()));
case "jobInvoker":
return Optional.ofNullable(clazz.cast(jobInvoker()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function