software.amazon.awssdk.services.verifiedpermissions.model.UpdateIdentitySourceRequest Maven / Gradle / Ivy
Show all versions of verifiedpermissions 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.verifiedpermissions.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 UpdateIdentitySourceRequest extends VerifiedPermissionsRequest implements
ToCopyableBuilder {
private static final SdkField POLICY_STORE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("policyStoreId").getter(getter(UpdateIdentitySourceRequest::policyStoreId))
.setter(setter(Builder::policyStoreId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("policyStoreId").build()).build();
private static final SdkField IDENTITY_SOURCE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("identitySourceId").getter(getter(UpdateIdentitySourceRequest::identitySourceId))
.setter(setter(Builder::identitySourceId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("identitySourceId").build()).build();
private static final SdkField UPDATE_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("updateConfiguration")
.getter(getter(UpdateIdentitySourceRequest::updateConfiguration)).setter(setter(Builder::updateConfiguration))
.constructor(UpdateConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updateConfiguration").build())
.build();
private static final SdkField PRINCIPAL_ENTITY_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("principalEntityType").getter(getter(UpdateIdentitySourceRequest::principalEntityType))
.setter(setter(Builder::principalEntityType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("principalEntityType").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(POLICY_STORE_ID_FIELD,
IDENTITY_SOURCE_ID_FIELD, UPDATE_CONFIGURATION_FIELD, PRINCIPAL_ENTITY_TYPE_FIELD));
private final String policyStoreId;
private final String identitySourceId;
private final UpdateConfiguration updateConfiguration;
private final String principalEntityType;
private UpdateIdentitySourceRequest(BuilderImpl builder) {
super(builder);
this.policyStoreId = builder.policyStoreId;
this.identitySourceId = builder.identitySourceId;
this.updateConfiguration = builder.updateConfiguration;
this.principalEntityType = builder.principalEntityType;
}
/**
*
* Specifies the ID of the policy store that contains the identity source that you want to update.
*
*
* @return Specifies the ID of the policy store that contains the identity source that you want to update.
*/
public final String policyStoreId() {
return policyStoreId;
}
/**
*
* Specifies the ID of the identity source that you want to update.
*
*
* @return Specifies the ID of the identity source that you want to update.
*/
public final String identitySourceId() {
return identitySourceId;
}
/**
*
* Specifies the details required to communicate with the identity provider (IdP) associated with this identity
* source.
*
*
*
* At this time, the only valid member of this structure is a Amazon Cognito user pool configuration.
*
*
* You must specify a userPoolArn
, and optionally, a ClientId
.
*
*
*
* @return Specifies the details required to communicate with the identity provider (IdP) associated with this
* identity source.
*
* At this time, the only valid member of this structure is a Amazon Cognito user pool configuration.
*
*
* You must specify a userPoolArn
, and optionally, a ClientId
.
*
*/
public final UpdateConfiguration updateConfiguration() {
return updateConfiguration;
}
/**
*
* Specifies the data type of principals generated for identities authenticated by the identity source.
*
*
* @return Specifies the data type of principals generated for identities authenticated by the identity source.
*/
public final String principalEntityType() {
return principalEntityType;
}
@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(policyStoreId());
hashCode = 31 * hashCode + Objects.hashCode(identitySourceId());
hashCode = 31 * hashCode + Objects.hashCode(updateConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(principalEntityType());
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 UpdateIdentitySourceRequest)) {
return false;
}
UpdateIdentitySourceRequest other = (UpdateIdentitySourceRequest) obj;
return Objects.equals(policyStoreId(), other.policyStoreId())
&& Objects.equals(identitySourceId(), other.identitySourceId())
&& Objects.equals(updateConfiguration(), other.updateConfiguration())
&& Objects.equals(principalEntityType(), other.principalEntityType());
}
/**
* 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("UpdateIdentitySourceRequest").add("PolicyStoreId", policyStoreId())
.add("IdentitySourceId", identitySourceId()).add("UpdateConfiguration", updateConfiguration())
.add("PrincipalEntityType", principalEntityType() == null ? null : "*** Sensitive Data Redacted ***").build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "policyStoreId":
return Optional.ofNullable(clazz.cast(policyStoreId()));
case "identitySourceId":
return Optional.ofNullable(clazz.cast(identitySourceId()));
case "updateConfiguration":
return Optional.ofNullable(clazz.cast(updateConfiguration()));
case "principalEntityType":
return Optional.ofNullable(clazz.cast(principalEntityType()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function