All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.signer.model.ListSigningJobsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Signer module holds the client classes that are used for communicating with Signer.

There is a newer version: 2.28.4
Show newest version
/*
 * 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 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 getter(Function g) { return obj -> g.apply((ListSigningJobsRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SignerRequest.Builder, SdkPojo, CopyableBuilder { /** *

* A status value with which to filter your results. *

* * @param status * A status value with which to filter your results. * @see SigningStatus * @return Returns a reference to this object so that method calls can be chained together. * @see SigningStatus */ Builder status(String status); /** *

* A status value with which to filter your results. *

* * @param status * A status value with which to filter your results. * @see SigningStatus * @return Returns a reference to this object so that method calls can be chained together. * @see SigningStatus */ Builder status(SigningStatus status); /** *

* The ID of microcontroller platform that you specified for the distribution of your code image. *

* * @param platformId * The ID of microcontroller platform that you specified for the distribution of your code image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder platformId(String platformId); /** *

* The IAM principal that requested the signing job. *

* * @param requestedBy * The IAM principal that requested the signing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestedBy(String 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. *

* * @param maxResults * 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 Returns a reference to this object so that method calls can be chained together. */ Builder maxResults(Integer 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. *

* * @param nextToken * 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 Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); /** *

* Filters results to return only signing jobs with revoked signatures. *

* * @param isRevoked * Filters results to return only signing jobs with revoked signatures. * @return Returns a reference to this object so that method calls can be chained together. */ Builder isRevoked(Boolean isRevoked); /** *

* Filters results to return only signing jobs with signatures expiring before a specified timestamp. *

* * @param signatureExpiresBefore * Filters results to return only signing jobs with signatures expiring before a specified timestamp. * @return Returns a reference to this object so that method calls can be chained together. */ Builder signatureExpiresBefore(Instant signatureExpiresBefore); /** *

* Filters results to return only signing jobs with signatures expiring after a specified timestamp. *

* * @param signatureExpiresAfter * Filters results to return only signing jobs with signatures expiring after a specified timestamp. * @return Returns a reference to this object so that method calls can be chained together. */ Builder signatureExpiresAfter(Instant signatureExpiresAfter); /** *

* Filters results to return only signing jobs initiated by a specified IAM entity. *

* * @param jobInvoker * Filters results to return only signing jobs initiated by a specified IAM entity. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobInvoker(String jobInvoker); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SignerRequest.BuilderImpl implements Builder { private String status; private String platformId; private String requestedBy; private Integer maxResults; private String nextToken; private Boolean isRevoked; private Instant signatureExpiresBefore; private Instant signatureExpiresAfter; private String jobInvoker; private BuilderImpl() { } private BuilderImpl(ListSigningJobsRequest model) { super(model); status(model.status); platformId(model.platformId); requestedBy(model.requestedBy); maxResults(model.maxResults); nextToken(model.nextToken); isRevoked(model.isRevoked); signatureExpiresBefore(model.signatureExpiresBefore); signatureExpiresAfter(model.signatureExpiresAfter); jobInvoker(model.jobInvoker); } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(SigningStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getPlatformId() { return platformId; } public final void setPlatformId(String platformId) { this.platformId = platformId; } @Override public final Builder platformId(String platformId) { this.platformId = platformId; return this; } public final String getRequestedBy() { return requestedBy; } public final void setRequestedBy(String requestedBy) { this.requestedBy = requestedBy; } @Override public final Builder requestedBy(String requestedBy) { this.requestedBy = requestedBy; return this; } public final Integer getMaxResults() { return maxResults; } public final void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } @Override public final Builder maxResults(Integer maxResults) { this.maxResults = maxResults; return this; } public final String getNextToken() { return nextToken; } public final void setNextToken(String nextToken) { this.nextToken = nextToken; } @Override public final Builder nextToken(String nextToken) { this.nextToken = nextToken; return this; } public final Boolean getIsRevoked() { return isRevoked; } public final void setIsRevoked(Boolean isRevoked) { this.isRevoked = isRevoked; } @Override public final Builder isRevoked(Boolean isRevoked) { this.isRevoked = isRevoked; return this; } public final Instant getSignatureExpiresBefore() { return signatureExpiresBefore; } public final void setSignatureExpiresBefore(Instant signatureExpiresBefore) { this.signatureExpiresBefore = signatureExpiresBefore; } @Override public final Builder signatureExpiresBefore(Instant signatureExpiresBefore) { this.signatureExpiresBefore = signatureExpiresBefore; return this; } public final Instant getSignatureExpiresAfter() { return signatureExpiresAfter; } public final void setSignatureExpiresAfter(Instant signatureExpiresAfter) { this.signatureExpiresAfter = signatureExpiresAfter; } @Override public final Builder signatureExpiresAfter(Instant signatureExpiresAfter) { this.signatureExpiresAfter = signatureExpiresAfter; return this; } public final String getJobInvoker() { return jobInvoker; } public final void setJobInvoker(String jobInvoker) { this.jobInvoker = jobInvoker; } @Override public final Builder jobInvoker(String jobInvoker) { this.jobInvoker = jobInvoker; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public ListSigningJobsRequest build() { return new ListSigningJobsRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy