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

software.amazon.awssdk.services.cleanrooms.model.Membership Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.28.3
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.cleanrooms.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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.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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The membership object. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Membership implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id") .getter(getter(Membership::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(Membership::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField COLLABORATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationArn").getter(getter(Membership::collaborationArn)) .setter(setter(Builder::collaborationArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationArn").build()).build(); private static final SdkField COLLABORATION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationId").getter(getter(Membership::collaborationId)).setter(setter(Builder::collaborationId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationId").build()).build(); private static final SdkField COLLABORATION_CREATOR_ACCOUNT_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("collaborationCreatorAccountId") .getter(getter(Membership::collaborationCreatorAccountId)) .setter(setter(Builder::collaborationCreatorAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationCreatorAccountId") .build()).build(); private static final SdkField COLLABORATION_CREATOR_DISPLAY_NAME_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("collaborationCreatorDisplayName") .getter(getter(Membership::collaborationCreatorDisplayName)) .setter(setter(Builder::collaborationCreatorDisplayName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationCreatorDisplayName") .build()).build(); private static final SdkField COLLABORATION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationName").getter(getter(Membership::collaborationName)) .setter(setter(Builder::collaborationName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationName").build()).build(); private static final SdkField CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createTime").getter(getter(Membership::createTime)).setter(setter(Builder::createTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createTime").build()).build(); private static final SdkField UPDATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("updateTime").getter(getter(Membership::updateTime)).setter(setter(Builder::updateTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updateTime").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(Membership::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField> MEMBER_ABILITIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("memberAbilities") .getter(getter(Membership::memberAbilitiesAsStrings)) .setter(setter(Builder::memberAbilitiesWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("memberAbilities").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField QUERY_LOG_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("queryLogStatus").getter(getter(Membership::queryLogStatusAsString)) .setter(setter(Builder::queryLogStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("queryLogStatus").build()).build(); private static final SdkField DEFAULT_RESULT_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("defaultResultConfiguration") .getter(getter(Membership::defaultResultConfiguration)) .setter(setter(Builder::defaultResultConfiguration)) .constructor(MembershipProtectedQueryResultConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("defaultResultConfiguration").build()) .build(); private static final SdkField PAYMENT_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("paymentConfiguration") .getter(getter(Membership::paymentConfiguration)).setter(setter(Builder::paymentConfiguration)) .constructor(MembershipPaymentConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("paymentConfiguration").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, ARN_FIELD, COLLABORATION_ARN_FIELD, COLLABORATION_ID_FIELD, COLLABORATION_CREATOR_ACCOUNT_ID_FIELD, COLLABORATION_CREATOR_DISPLAY_NAME_FIELD, COLLABORATION_NAME_FIELD, CREATE_TIME_FIELD, UPDATE_TIME_FIELD, STATUS_FIELD, MEMBER_ABILITIES_FIELD, QUERY_LOG_STATUS_FIELD, DEFAULT_RESULT_CONFIGURATION_FIELD, PAYMENT_CONFIGURATION_FIELD)); private static final long serialVersionUID = 1L; private final String id; private final String arn; private final String collaborationArn; private final String collaborationId; private final String collaborationCreatorAccountId; private final String collaborationCreatorDisplayName; private final String collaborationName; private final Instant createTime; private final Instant updateTime; private final String status; private final List memberAbilities; private final String queryLogStatus; private final MembershipProtectedQueryResultConfiguration defaultResultConfiguration; private final MembershipPaymentConfiguration paymentConfiguration; private Membership(BuilderImpl builder) { this.id = builder.id; this.arn = builder.arn; this.collaborationArn = builder.collaborationArn; this.collaborationId = builder.collaborationId; this.collaborationCreatorAccountId = builder.collaborationCreatorAccountId; this.collaborationCreatorDisplayName = builder.collaborationCreatorDisplayName; this.collaborationName = builder.collaborationName; this.createTime = builder.createTime; this.updateTime = builder.updateTime; this.status = builder.status; this.memberAbilities = builder.memberAbilities; this.queryLogStatus = builder.queryLogStatus; this.defaultResultConfiguration = builder.defaultResultConfiguration; this.paymentConfiguration = builder.paymentConfiguration; } /** *

* The unique ID of the membership. *

* * @return The unique ID of the membership. */ public final String id() { return id; } /** *

* The unique ARN for the membership. *

* * @return The unique ARN for the membership. */ public final String arn() { return arn; } /** *

* The unique ARN for the membership's associated collaboration. *

* * @return The unique ARN for the membership's associated collaboration. */ public final String collaborationArn() { return collaborationArn; } /** *

* The unique ID for the membership's collaboration. *

* * @return The unique ID for the membership's collaboration. */ public final String collaborationId() { return collaborationId; } /** *

* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services * account ID. *

* * @return The identifier used to reference members of the collaboration. Currently only supports Amazon Web * Services account ID. */ public final String collaborationCreatorAccountId() { return collaborationCreatorAccountId; } /** *

* The display name of the collaboration creator. *

* * @return The display name of the collaboration creator. */ public final String collaborationCreatorDisplayName() { return collaborationCreatorDisplayName; } /** *

* The name of the membership's collaboration. *

* * @return The name of the membership's collaboration. */ public final String collaborationName() { return collaborationName; } /** *

* The time when the membership was created. *

* * @return The time when the membership was created. */ public final Instant createTime() { return createTime; } /** *

* The time the membership metadata was last updated. *

* * @return The time the membership metadata was last updated. */ public final Instant updateTime() { return updateTime; } /** *

* The status of the membership. *

*

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

* * @return The status of the membership. * @see MembershipStatus */ public final MembershipStatus status() { return MembershipStatus.fromValue(status); } /** *

* The status of the membership. *

*

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

* * @return The status of the membership. * @see MembershipStatus */ public final String statusAsString() { return status; } /** *

* The abilities granted to the collaboration member. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasMemberAbilities} method. *

* * @return The abilities granted to the collaboration member. */ public final List memberAbilities() { return MemberAbilitiesCopier.copyStringToEnum(memberAbilities); } /** * For responses, this returns true if the service returned a value for the MemberAbilities property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasMemberAbilities() { return memberAbilities != null && !(memberAbilities instanceof SdkAutoConstructList); } /** *

* The abilities granted to the collaboration member. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasMemberAbilities} method. *

* * @return The abilities granted to the collaboration member. */ public final List memberAbilitiesAsStrings() { return memberAbilities; } /** *

* An indicator as to whether query logging has been enabled or disabled for the membership. *

*

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

* * @return An indicator as to whether query logging has been enabled or disabled for the membership. * @see MembershipQueryLogStatus */ public final MembershipQueryLogStatus queryLogStatus() { return MembershipQueryLogStatus.fromValue(queryLogStatus); } /** *

* An indicator as to whether query logging has been enabled or disabled for the membership. *

*

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

* * @return An indicator as to whether query logging has been enabled or disabled for the membership. * @see MembershipQueryLogStatus */ public final String queryLogStatusAsString() { return queryLogStatus; } /** *

* The default protected query result configuration as specified by the member who can receive results. *

* * @return The default protected query result configuration as specified by the member who can receive results. */ public final MembershipProtectedQueryResultConfiguration defaultResultConfiguration() { return defaultResultConfiguration; } /** *

* The payment responsibilities accepted by the collaboration member. *

* * @return The payment responsibilities accepted by the collaboration member. */ public final MembershipPaymentConfiguration paymentConfiguration() { return paymentConfiguration; } @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 + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(collaborationArn()); hashCode = 31 * hashCode + Objects.hashCode(collaborationId()); hashCode = 31 * hashCode + Objects.hashCode(collaborationCreatorAccountId()); hashCode = 31 * hashCode + Objects.hashCode(collaborationCreatorDisplayName()); hashCode = 31 * hashCode + Objects.hashCode(collaborationName()); hashCode = 31 * hashCode + Objects.hashCode(createTime()); hashCode = 31 * hashCode + Objects.hashCode(updateTime()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasMemberAbilities() ? memberAbilitiesAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(queryLogStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(defaultResultConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(paymentConfiguration()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Membership)) { return false; } Membership other = (Membership) obj; return Objects.equals(id(), other.id()) && Objects.equals(arn(), other.arn()) && Objects.equals(collaborationArn(), other.collaborationArn()) && Objects.equals(collaborationId(), other.collaborationId()) && Objects.equals(collaborationCreatorAccountId(), other.collaborationCreatorAccountId()) && Objects.equals(collaborationCreatorDisplayName(), other.collaborationCreatorDisplayName()) && Objects.equals(collaborationName(), other.collaborationName()) && Objects.equals(createTime(), other.createTime()) && Objects.equals(updateTime(), other.updateTime()) && Objects.equals(statusAsString(), other.statusAsString()) && hasMemberAbilities() == other.hasMemberAbilities() && Objects.equals(memberAbilitiesAsStrings(), other.memberAbilitiesAsStrings()) && Objects.equals(queryLogStatusAsString(), other.queryLogStatusAsString()) && Objects.equals(defaultResultConfiguration(), other.defaultResultConfiguration()) && Objects.equals(paymentConfiguration(), other.paymentConfiguration()); } /** * 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("Membership").add("Id", id()).add("Arn", arn()).add("CollaborationArn", collaborationArn()) .add("CollaborationId", collaborationId()).add("CollaborationCreatorAccountId", collaborationCreatorAccountId()) .add("CollaborationCreatorDisplayName", collaborationCreatorDisplayName()) .add("CollaborationName", collaborationName()).add("CreateTime", createTime()).add("UpdateTime", updateTime()) .add("Status", statusAsString()).add("MemberAbilities", hasMemberAbilities() ? memberAbilitiesAsStrings() : null) .add("QueryLogStatus", queryLogStatusAsString()).add("DefaultResultConfiguration", defaultResultConfiguration()) .add("PaymentConfiguration", paymentConfiguration()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "id": return Optional.ofNullable(clazz.cast(id())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "collaborationArn": return Optional.ofNullable(clazz.cast(collaborationArn())); case "collaborationId": return Optional.ofNullable(clazz.cast(collaborationId())); case "collaborationCreatorAccountId": return Optional.ofNullable(clazz.cast(collaborationCreatorAccountId())); case "collaborationCreatorDisplayName": return Optional.ofNullable(clazz.cast(collaborationCreatorDisplayName())); case "collaborationName": return Optional.ofNullable(clazz.cast(collaborationName())); case "createTime": return Optional.ofNullable(clazz.cast(createTime())); case "updateTime": return Optional.ofNullable(clazz.cast(updateTime())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "memberAbilities": return Optional.ofNullable(clazz.cast(memberAbilitiesAsStrings())); case "queryLogStatus": return Optional.ofNullable(clazz.cast(queryLogStatusAsString())); case "defaultResultConfiguration": return Optional.ofNullable(clazz.cast(defaultResultConfiguration())); case "paymentConfiguration": return Optional.ofNullable(clazz.cast(paymentConfiguration())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Membership) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The unique ID of the membership. *

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

* The unique ARN for the membership. *

* * @param arn * The unique ARN for the membership. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The unique ARN for the membership's associated collaboration. *

* * @param collaborationArn * The unique ARN for the membership's associated collaboration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationArn(String collaborationArn); /** *

* The unique ID for the membership's collaboration. *

* * @param collaborationId * The unique ID for the membership's collaboration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationId(String collaborationId); /** *

* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services * account ID. *

* * @param collaborationCreatorAccountId * The identifier used to reference members of the collaboration. Currently only supports Amazon Web * Services account ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationCreatorAccountId(String collaborationCreatorAccountId); /** *

* The display name of the collaboration creator. *

* * @param collaborationCreatorDisplayName * The display name of the collaboration creator. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationCreatorDisplayName(String collaborationCreatorDisplayName); /** *

* The name of the membership's collaboration. *

* * @param collaborationName * The name of the membership's collaboration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationName(String collaborationName); /** *

* The time when the membership was created. *

* * @param createTime * The time when the membership was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createTime(Instant createTime); /** *

* The time the membership metadata was last updated. *

* * @param updateTime * The time the membership metadata was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateTime(Instant updateTime); /** *

* The status of the membership. *

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

* The status of the membership. *

* * @param status * The status of the membership. * @see MembershipStatus * @return Returns a reference to this object so that method calls can be chained together. * @see MembershipStatus */ Builder status(MembershipStatus status); /** *

* The abilities granted to the collaboration member. *

* * @param memberAbilities * The abilities granted to the collaboration member. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memberAbilitiesWithStrings(Collection memberAbilities); /** *

* The abilities granted to the collaboration member. *

* * @param memberAbilities * The abilities granted to the collaboration member. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memberAbilitiesWithStrings(String... memberAbilities); /** *

* The abilities granted to the collaboration member. *

* * @param memberAbilities * The abilities granted to the collaboration member. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memberAbilities(Collection memberAbilities); /** *

* The abilities granted to the collaboration member. *

* * @param memberAbilities * The abilities granted to the collaboration member. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memberAbilities(MemberAbility... memberAbilities); /** *

* An indicator as to whether query logging has been enabled or disabled for the membership. *

* * @param queryLogStatus * An indicator as to whether query logging has been enabled or disabled for the membership. * @see MembershipQueryLogStatus * @return Returns a reference to this object so that method calls can be chained together. * @see MembershipQueryLogStatus */ Builder queryLogStatus(String queryLogStatus); /** *

* An indicator as to whether query logging has been enabled or disabled for the membership. *

* * @param queryLogStatus * An indicator as to whether query logging has been enabled or disabled for the membership. * @see MembershipQueryLogStatus * @return Returns a reference to this object so that method calls can be chained together. * @see MembershipQueryLogStatus */ Builder queryLogStatus(MembershipQueryLogStatus queryLogStatus); /** *

* The default protected query result configuration as specified by the member who can receive results. *

* * @param defaultResultConfiguration * The default protected query result configuration as specified by the member who can receive results. * @return Returns a reference to this object so that method calls can be chained together. */ Builder defaultResultConfiguration(MembershipProtectedQueryResultConfiguration defaultResultConfiguration); /** *

* The default protected query result configuration as specified by the member who can receive results. *

* This is a convenience method that creates an instance of the * {@link MembershipProtectedQueryResultConfiguration.Builder} avoiding the need to create one manually via * {@link MembershipProtectedQueryResultConfiguration#builder()}. * *

* When the {@link Consumer} completes, {@link MembershipProtectedQueryResultConfiguration.Builder#build()} is * called immediately and its result is passed to * {@link #defaultResultConfiguration(MembershipProtectedQueryResultConfiguration)}. * * @param defaultResultConfiguration * a consumer that will call methods on {@link MembershipProtectedQueryResultConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #defaultResultConfiguration(MembershipProtectedQueryResultConfiguration) */ default Builder defaultResultConfiguration( Consumer defaultResultConfiguration) { return defaultResultConfiguration(MembershipProtectedQueryResultConfiguration.builder() .applyMutation(defaultResultConfiguration).build()); } /** *

* The payment responsibilities accepted by the collaboration member. *

* * @param paymentConfiguration * The payment responsibilities accepted by the collaboration member. * @return Returns a reference to this object so that method calls can be chained together. */ Builder paymentConfiguration(MembershipPaymentConfiguration paymentConfiguration); /** *

* The payment responsibilities accepted by the collaboration member. *

* This is a convenience method that creates an instance of the {@link MembershipPaymentConfiguration.Builder} * avoiding the need to create one manually via {@link MembershipPaymentConfiguration#builder()}. * *

* When the {@link Consumer} completes, {@link MembershipPaymentConfiguration.Builder#build()} is called * immediately and its result is passed to {@link #paymentConfiguration(MembershipPaymentConfiguration)}. * * @param paymentConfiguration * a consumer that will call methods on {@link MembershipPaymentConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #paymentConfiguration(MembershipPaymentConfiguration) */ default Builder paymentConfiguration(Consumer paymentConfiguration) { return paymentConfiguration(MembershipPaymentConfiguration.builder().applyMutation(paymentConfiguration).build()); } } static final class BuilderImpl implements Builder { private String id; private String arn; private String collaborationArn; private String collaborationId; private String collaborationCreatorAccountId; private String collaborationCreatorDisplayName; private String collaborationName; private Instant createTime; private Instant updateTime; private String status; private List memberAbilities = DefaultSdkAutoConstructList.getInstance(); private String queryLogStatus; private MembershipProtectedQueryResultConfiguration defaultResultConfiguration; private MembershipPaymentConfiguration paymentConfiguration; private BuilderImpl() { } private BuilderImpl(Membership model) { id(model.id); arn(model.arn); collaborationArn(model.collaborationArn); collaborationId(model.collaborationId); collaborationCreatorAccountId(model.collaborationCreatorAccountId); collaborationCreatorDisplayName(model.collaborationCreatorDisplayName); collaborationName(model.collaborationName); createTime(model.createTime); updateTime(model.updateTime); status(model.status); memberAbilitiesWithStrings(model.memberAbilities); queryLogStatus(model.queryLogStatus); defaultResultConfiguration(model.defaultResultConfiguration); paymentConfiguration(model.paymentConfiguration); } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final String getCollaborationArn() { return collaborationArn; } public final void setCollaborationArn(String collaborationArn) { this.collaborationArn = collaborationArn; } @Override public final Builder collaborationArn(String collaborationArn) { this.collaborationArn = collaborationArn; return this; } public final String getCollaborationId() { return collaborationId; } public final void setCollaborationId(String collaborationId) { this.collaborationId = collaborationId; } @Override public final Builder collaborationId(String collaborationId) { this.collaborationId = collaborationId; return this; } public final String getCollaborationCreatorAccountId() { return collaborationCreatorAccountId; } public final void setCollaborationCreatorAccountId(String collaborationCreatorAccountId) { this.collaborationCreatorAccountId = collaborationCreatorAccountId; } @Override public final Builder collaborationCreatorAccountId(String collaborationCreatorAccountId) { this.collaborationCreatorAccountId = collaborationCreatorAccountId; return this; } public final String getCollaborationCreatorDisplayName() { return collaborationCreatorDisplayName; } public final void setCollaborationCreatorDisplayName(String collaborationCreatorDisplayName) { this.collaborationCreatorDisplayName = collaborationCreatorDisplayName; } @Override public final Builder collaborationCreatorDisplayName(String collaborationCreatorDisplayName) { this.collaborationCreatorDisplayName = collaborationCreatorDisplayName; return this; } public final String getCollaborationName() { return collaborationName; } public final void setCollaborationName(String collaborationName) { this.collaborationName = collaborationName; } @Override public final Builder collaborationName(String collaborationName) { this.collaborationName = collaborationName; return this; } public final Instant getCreateTime() { return createTime; } public final void setCreateTime(Instant createTime) { this.createTime = createTime; } @Override public final Builder createTime(Instant createTime) { this.createTime = createTime; return this; } public final Instant getUpdateTime() { return updateTime; } public final void setUpdateTime(Instant updateTime) { this.updateTime = updateTime; } @Override public final Builder updateTime(Instant updateTime) { this.updateTime = updateTime; return this; } 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(MembershipStatus status) { this.status(status == null ? null : status.toString()); return this; } public final Collection getMemberAbilities() { if (memberAbilities instanceof SdkAutoConstructList) { return null; } return memberAbilities; } public final void setMemberAbilities(Collection memberAbilities) { this.memberAbilities = MemberAbilitiesCopier.copy(memberAbilities); } @Override public final Builder memberAbilitiesWithStrings(Collection memberAbilities) { this.memberAbilities = MemberAbilitiesCopier.copy(memberAbilities); return this; } @Override @SafeVarargs public final Builder memberAbilitiesWithStrings(String... memberAbilities) { memberAbilitiesWithStrings(Arrays.asList(memberAbilities)); return this; } @Override public final Builder memberAbilities(Collection memberAbilities) { this.memberAbilities = MemberAbilitiesCopier.copyEnumToString(memberAbilities); return this; } @Override @SafeVarargs public final Builder memberAbilities(MemberAbility... memberAbilities) { memberAbilities(Arrays.asList(memberAbilities)); return this; } public final String getQueryLogStatus() { return queryLogStatus; } public final void setQueryLogStatus(String queryLogStatus) { this.queryLogStatus = queryLogStatus; } @Override public final Builder queryLogStatus(String queryLogStatus) { this.queryLogStatus = queryLogStatus; return this; } @Override public final Builder queryLogStatus(MembershipQueryLogStatus queryLogStatus) { this.queryLogStatus(queryLogStatus == null ? null : queryLogStatus.toString()); return this; } public final MembershipProtectedQueryResultConfiguration.Builder getDefaultResultConfiguration() { return defaultResultConfiguration != null ? defaultResultConfiguration.toBuilder() : null; } public final void setDefaultResultConfiguration( MembershipProtectedQueryResultConfiguration.BuilderImpl defaultResultConfiguration) { this.defaultResultConfiguration = defaultResultConfiguration != null ? defaultResultConfiguration.build() : null; } @Override public final Builder defaultResultConfiguration(MembershipProtectedQueryResultConfiguration defaultResultConfiguration) { this.defaultResultConfiguration = defaultResultConfiguration; return this; } public final MembershipPaymentConfiguration.Builder getPaymentConfiguration() { return paymentConfiguration != null ? paymentConfiguration.toBuilder() : null; } public final void setPaymentConfiguration(MembershipPaymentConfiguration.BuilderImpl paymentConfiguration) { this.paymentConfiguration = paymentConfiguration != null ? paymentConfiguration.build() : null; } @Override public final Builder paymentConfiguration(MembershipPaymentConfiguration paymentConfiguration) { this.paymentConfiguration = paymentConfiguration; return this; } @Override public Membership build() { return new Membership(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy