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

software.amazon.awssdk.services.datazone.model.ListSubscriptionGrantsRequest Maven / Gradle / Ivy

Go to download

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

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.datazone.model;

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 ListSubscriptionGrantsRequest extends DataZoneRequest implements
        ToCopyableBuilder {
    private static final SdkField DOMAIN_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("domainIdentifier").getter(getter(ListSubscriptionGrantsRequest::domainIdentifier))
            .setter(setter(Builder::domainIdentifier))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("domainIdentifier").build()).build();

    private static final SdkField ENVIRONMENT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("environmentId").getter(getter(ListSubscriptionGrantsRequest::environmentId))
            .setter(setter(Builder::environmentId))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("environmentId").build()).build();

    private static final SdkField MAX_RESULTS_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("maxResults").getter(getter(ListSubscriptionGrantsRequest::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(ListSubscriptionGrantsRequest::nextToken)).setter(setter(Builder::nextToken))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("nextToken").build()).build();

    private static final SdkField OWNING_PROJECT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("owningProjectId").getter(getter(ListSubscriptionGrantsRequest::owningProjectId))
            .setter(setter(Builder::owningProjectId))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("owningProjectId").build())
            .build();

    private static final SdkField SORT_BY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("sortBy")
            .getter(getter(ListSubscriptionGrantsRequest::sortByAsString)).setter(setter(Builder::sortBy))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("sortBy").build()).build();

    private static final SdkField SORT_ORDER_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("sortOrder").getter(getter(ListSubscriptionGrantsRequest::sortOrderAsString))
            .setter(setter(Builder::sortOrder))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("sortOrder").build()).build();

    private static final SdkField SUBSCRIBED_LISTING_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("subscribedListingId").getter(getter(ListSubscriptionGrantsRequest::subscribedListingId))
            .setter(setter(Builder::subscribedListingId))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("subscribedListingId").build())
            .build();

    private static final SdkField SUBSCRIPTION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("subscriptionId").getter(getter(ListSubscriptionGrantsRequest::subscriptionId))
            .setter(setter(Builder::subscriptionId))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("subscriptionId").build())
            .build();

    private static final SdkField SUBSCRIPTION_TARGET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("subscriptionTargetId").getter(getter(ListSubscriptionGrantsRequest::subscriptionTargetId))
            .setter(setter(Builder::subscriptionTargetId))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("subscriptionTargetId").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DOMAIN_IDENTIFIER_FIELD,
            ENVIRONMENT_ID_FIELD, MAX_RESULTS_FIELD, NEXT_TOKEN_FIELD, OWNING_PROJECT_ID_FIELD, SORT_BY_FIELD, SORT_ORDER_FIELD,
            SUBSCRIBED_LISTING_ID_FIELD, SUBSCRIPTION_ID_FIELD, SUBSCRIPTION_TARGET_ID_FIELD));

    private final String domainIdentifier;

    private final String environmentId;

    private final Integer maxResults;

    private final String nextToken;

    private final String owningProjectId;

    private final String sortBy;

    private final String sortOrder;

    private final String subscribedListingId;

    private final String subscriptionId;

    private final String subscriptionTargetId;

    private ListSubscriptionGrantsRequest(BuilderImpl builder) {
        super(builder);
        this.domainIdentifier = builder.domainIdentifier;
        this.environmentId = builder.environmentId;
        this.maxResults = builder.maxResults;
        this.nextToken = builder.nextToken;
        this.owningProjectId = builder.owningProjectId;
        this.sortBy = builder.sortBy;
        this.sortOrder = builder.sortOrder;
        this.subscribedListingId = builder.subscribedListingId;
        this.subscriptionId = builder.subscriptionId;
        this.subscriptionTargetId = builder.subscriptionTargetId;
    }

    /**
     * 

* The identifier of the Amazon DataZone domain. *

* * @return The identifier of the Amazon DataZone domain. */ public final String domainIdentifier() { return domainIdentifier; } /** *

* The identifier of the Amazon DataZone environment. *

* * @return The identifier of the Amazon DataZone environment. */ public final String environmentId() { return environmentId; } /** *

* The maximum number of subscription grants to return in a single call to ListSubscriptionGrants. When * the number of subscription grants to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to * ListSubscriptionGrants to list the next set of subscription grants. *

* * @return The maximum number of subscription grants to return in a single call to * ListSubscriptionGrants. When the number of subscription grants to be listed is greater than * the value of MaxResults, the response contains a NextToken value that you can * use in a subsequent call to ListSubscriptionGrants to list the next set of subscription * grants. */ public final Integer maxResults() { return maxResults; } /** *

* When the number of subscription grants is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * subscription grants, the response includes a pagination token named NextToken. You can specify this * NextToken value in a subsequent call to ListSubscriptionGrants to list the next set of * subscription grants. *

* * @return When the number of subscription grants is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number * of subscription grants, the response includes a pagination token named NextToken. You can * specify this NextToken value in a subsequent call to ListSubscriptionGrants to * list the next set of subscription grants. */ public final String nextToken() { return nextToken; } /** *

* The ID of the owning project of the subscription grants. *

* * @return The ID of the owning project of the subscription grants. */ public final String owningProjectId() { return owningProjectId; } /** *

* Specifies the way of sorting the results of this action. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #sortBy} will * return {@link SortKey#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #sortByAsString}. *

* * @return Specifies the way of sorting the results of this action. * @see SortKey */ public final SortKey sortBy() { return SortKey.fromValue(sortBy); } /** *

* Specifies the way of sorting the results of this action. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #sortBy} will * return {@link SortKey#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #sortByAsString}. *

* * @return Specifies the way of sorting the results of this action. * @see SortKey */ public final String sortByAsString() { return sortBy; } /** *

* Specifies the sort order of this action. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #sortOrder} will * return {@link SortOrder#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #sortOrderAsString}. *

* * @return Specifies the sort order of this action. * @see SortOrder */ public final SortOrder sortOrder() { return SortOrder.fromValue(sortOrder); } /** *

* Specifies the sort order of this action. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #sortOrder} will * return {@link SortOrder#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #sortOrderAsString}. *

* * @return Specifies the sort order of this action. * @see SortOrder */ public final String sortOrderAsString() { return sortOrder; } /** *

* The identifier of the subscribed listing. *

* * @return The identifier of the subscribed listing. */ public final String subscribedListingId() { return subscribedListingId; } /** *

* The identifier of the subscription. *

* * @return The identifier of the subscription. */ public final String subscriptionId() { return subscriptionId; } /** *

* The identifier of the subscription target. *

* * @return The identifier of the subscription target. */ public final String subscriptionTargetId() { return subscriptionTargetId; } @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(domainIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(environmentId()); hashCode = 31 * hashCode + Objects.hashCode(maxResults()); hashCode = 31 * hashCode + Objects.hashCode(nextToken()); hashCode = 31 * hashCode + Objects.hashCode(owningProjectId()); hashCode = 31 * hashCode + Objects.hashCode(sortByAsString()); hashCode = 31 * hashCode + Objects.hashCode(sortOrderAsString()); hashCode = 31 * hashCode + Objects.hashCode(subscribedListingId()); hashCode = 31 * hashCode + Objects.hashCode(subscriptionId()); hashCode = 31 * hashCode + Objects.hashCode(subscriptionTargetId()); 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 ListSubscriptionGrantsRequest)) { return false; } ListSubscriptionGrantsRequest other = (ListSubscriptionGrantsRequest) obj; return Objects.equals(domainIdentifier(), other.domainIdentifier()) && Objects.equals(environmentId(), other.environmentId()) && Objects.equals(maxResults(), other.maxResults()) && Objects.equals(nextToken(), other.nextToken()) && Objects.equals(owningProjectId(), other.owningProjectId()) && Objects.equals(sortByAsString(), other.sortByAsString()) && Objects.equals(sortOrderAsString(), other.sortOrderAsString()) && Objects.equals(subscribedListingId(), other.subscribedListingId()) && Objects.equals(subscriptionId(), other.subscriptionId()) && Objects.equals(subscriptionTargetId(), other.subscriptionTargetId()); } /** * 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("ListSubscriptionGrantsRequest").add("DomainIdentifier", domainIdentifier()) .add("EnvironmentId", environmentId()).add("MaxResults", maxResults()).add("NextToken", nextToken()) .add("OwningProjectId", owningProjectId()).add("SortBy", sortByAsString()).add("SortOrder", sortOrderAsString()) .add("SubscribedListingId", subscribedListingId()).add("SubscriptionId", subscriptionId()) .add("SubscriptionTargetId", subscriptionTargetId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "domainIdentifier": return Optional.ofNullable(clazz.cast(domainIdentifier())); case "environmentId": return Optional.ofNullable(clazz.cast(environmentId())); case "maxResults": return Optional.ofNullable(clazz.cast(maxResults())); case "nextToken": return Optional.ofNullable(clazz.cast(nextToken())); case "owningProjectId": return Optional.ofNullable(clazz.cast(owningProjectId())); case "sortBy": return Optional.ofNullable(clazz.cast(sortByAsString())); case "sortOrder": return Optional.ofNullable(clazz.cast(sortOrderAsString())); case "subscribedListingId": return Optional.ofNullable(clazz.cast(subscribedListingId())); case "subscriptionId": return Optional.ofNullable(clazz.cast(subscriptionId())); case "subscriptionTargetId": return Optional.ofNullable(clazz.cast(subscriptionTargetId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ListSubscriptionGrantsRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DataZoneRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The identifier of the Amazon DataZone domain. *

* * @param domainIdentifier * The identifier of the Amazon DataZone domain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainIdentifier(String domainIdentifier); /** *

* The identifier of the Amazon DataZone environment. *

* * @param environmentId * The identifier of the Amazon DataZone environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentId(String environmentId); /** *

* The maximum number of subscription grants to return in a single call to ListSubscriptionGrants. * When the number of subscription grants to be listed is greater than the value of MaxResults, the * response contains a NextToken value that you can use in a subsequent call to * ListSubscriptionGrants to list the next set of subscription grants. *

* * @param maxResults * The maximum number of subscription grants to return in a single call to * ListSubscriptionGrants. When the number of subscription grants to be listed is greater * than the value of MaxResults, the response contains a NextToken value that * you can use in a subsequent call to ListSubscriptionGrants to list the next set of * subscription grants. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxResults(Integer maxResults); /** *

* When the number of subscription grants is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * subscription grants, the response includes a pagination token named NextToken. You can specify * this NextToken value in a subsequent call to ListSubscriptionGrants to list the * next set of subscription grants. *

* * @param nextToken * When the number of subscription grants is greater than the default value for the * MaxResults parameter, or if you explicitly specify a value for MaxResults * that is less than the number of subscription grants, the response includes a pagination token named * NextToken. You can specify this NextToken value in a subsequent call to * ListSubscriptionGrants to list the next set of subscription grants. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); /** *

* The ID of the owning project of the subscription grants. *

* * @param owningProjectId * The ID of the owning project of the subscription grants. * @return Returns a reference to this object so that method calls can be chained together. */ Builder owningProjectId(String owningProjectId); /** *

* Specifies the way of sorting the results of this action. *

* * @param sortBy * Specifies the way of sorting the results of this action. * @see SortKey * @return Returns a reference to this object so that method calls can be chained together. * @see SortKey */ Builder sortBy(String sortBy); /** *

* Specifies the way of sorting the results of this action. *

* * @param sortBy * Specifies the way of sorting the results of this action. * @see SortKey * @return Returns a reference to this object so that method calls can be chained together. * @see SortKey */ Builder sortBy(SortKey sortBy); /** *

* Specifies the sort order of this action. *

* * @param sortOrder * Specifies the sort order of this action. * @see SortOrder * @return Returns a reference to this object so that method calls can be chained together. * @see SortOrder */ Builder sortOrder(String sortOrder); /** *

* Specifies the sort order of this action. *

* * @param sortOrder * Specifies the sort order of this action. * @see SortOrder * @return Returns a reference to this object so that method calls can be chained together. * @see SortOrder */ Builder sortOrder(SortOrder sortOrder); /** *

* The identifier of the subscribed listing. *

* * @param subscribedListingId * The identifier of the subscribed listing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subscribedListingId(String subscribedListingId); /** *

* The identifier of the subscription. *

* * @param subscriptionId * The identifier of the subscription. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subscriptionId(String subscriptionId); /** *

* The identifier of the subscription target. *

* * @param subscriptionTargetId * The identifier of the subscription target. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subscriptionTargetId(String subscriptionTargetId); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends DataZoneRequest.BuilderImpl implements Builder { private String domainIdentifier; private String environmentId; private Integer maxResults; private String nextToken; private String owningProjectId; private String sortBy; private String sortOrder; private String subscribedListingId; private String subscriptionId; private String subscriptionTargetId; private BuilderImpl() { } private BuilderImpl(ListSubscriptionGrantsRequest model) { super(model); domainIdentifier(model.domainIdentifier); environmentId(model.environmentId); maxResults(model.maxResults); nextToken(model.nextToken); owningProjectId(model.owningProjectId); sortBy(model.sortBy); sortOrder(model.sortOrder); subscribedListingId(model.subscribedListingId); subscriptionId(model.subscriptionId); subscriptionTargetId(model.subscriptionTargetId); } public final String getDomainIdentifier() { return domainIdentifier; } public final void setDomainIdentifier(String domainIdentifier) { this.domainIdentifier = domainIdentifier; } @Override public final Builder domainIdentifier(String domainIdentifier) { this.domainIdentifier = domainIdentifier; return this; } public final String getEnvironmentId() { return environmentId; } public final void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } @Override public final Builder environmentId(String environmentId) { this.environmentId = environmentId; 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 String getOwningProjectId() { return owningProjectId; } public final void setOwningProjectId(String owningProjectId) { this.owningProjectId = owningProjectId; } @Override public final Builder owningProjectId(String owningProjectId) { this.owningProjectId = owningProjectId; return this; } public final String getSortBy() { return sortBy; } public final void setSortBy(String sortBy) { this.sortBy = sortBy; } @Override public final Builder sortBy(String sortBy) { this.sortBy = sortBy; return this; } @Override public final Builder sortBy(SortKey sortBy) { this.sortBy(sortBy == null ? null : sortBy.toString()); return this; } public final String getSortOrder() { return sortOrder; } public final void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } @Override public final Builder sortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } @Override public final Builder sortOrder(SortOrder sortOrder) { this.sortOrder(sortOrder == null ? null : sortOrder.toString()); return this; } public final String getSubscribedListingId() { return subscribedListingId; } public final void setSubscribedListingId(String subscribedListingId) { this.subscribedListingId = subscribedListingId; } @Override public final Builder subscribedListingId(String subscribedListingId) { this.subscribedListingId = subscribedListingId; return this; } public final String getSubscriptionId() { return subscriptionId; } public final void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } @Override public final Builder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } public final String getSubscriptionTargetId() { return subscriptionTargetId; } public final void setSubscriptionTargetId(String subscriptionTargetId) { this.subscriptionTargetId = subscriptionTargetId; } @Override public final Builder subscriptionTargetId(String subscriptionTargetId) { this.subscriptionTargetId = subscriptionTargetId; 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 ListSubscriptionGrantsRequest build() { return new ListSubscriptionGrantsRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy