Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.clouddirectory.model;
import java.io.Serializable;
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.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;
/**
*
* Represents the output of a BatchRead operation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class BatchReadOperation implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField LIST_OBJECT_ATTRIBUTES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListObjectAttributes")
.getter(getter(BatchReadOperation::listObjectAttributes)).setter(setter(Builder::listObjectAttributes))
.constructor(BatchListObjectAttributes::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListObjectAttributes").build())
.build();
private static final SdkField LIST_OBJECT_CHILDREN_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListObjectChildren")
.getter(getter(BatchReadOperation::listObjectChildren)).setter(setter(Builder::listObjectChildren))
.constructor(BatchListObjectChildren::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListObjectChildren").build())
.build();
private static final SdkField LIST_ATTACHED_INDICES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListAttachedIndices")
.getter(getter(BatchReadOperation::listAttachedIndices)).setter(setter(Builder::listAttachedIndices))
.constructor(BatchListAttachedIndices::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListAttachedIndices").build())
.build();
private static final SdkField LIST_OBJECT_PARENT_PATHS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListObjectParentPaths")
.getter(getter(BatchReadOperation::listObjectParentPaths)).setter(setter(Builder::listObjectParentPaths))
.constructor(BatchListObjectParentPaths::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListObjectParentPaths").build())
.build();
private static final SdkField GET_OBJECT_INFORMATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("GetObjectInformation")
.getter(getter(BatchReadOperation::getObjectInformation)).setter(setter(Builder::getObjectInformation))
.constructor(BatchGetObjectInformation::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GetObjectInformation").build())
.build();
private static final SdkField GET_OBJECT_ATTRIBUTES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("GetObjectAttributes")
.getter(getter(BatchReadOperation::getObjectAttributes)).setter(setter(Builder::getObjectAttributes))
.constructor(BatchGetObjectAttributes::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GetObjectAttributes").build())
.build();
private static final SdkField LIST_OBJECT_PARENTS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListObjectParents")
.getter(getter(BatchReadOperation::listObjectParents)).setter(setter(Builder::listObjectParents))
.constructor(BatchListObjectParents::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListObjectParents").build()).build();
private static final SdkField LIST_OBJECT_POLICIES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListObjectPolicies")
.getter(getter(BatchReadOperation::listObjectPolicies)).setter(setter(Builder::listObjectPolicies))
.constructor(BatchListObjectPolicies::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListObjectPolicies").build())
.build();
private static final SdkField LIST_POLICY_ATTACHMENTS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListPolicyAttachments")
.getter(getter(BatchReadOperation::listPolicyAttachments)).setter(setter(Builder::listPolicyAttachments))
.constructor(BatchListPolicyAttachments::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListPolicyAttachments").build())
.build();
private static final SdkField LOOKUP_POLICY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("LookupPolicy")
.getter(getter(BatchReadOperation::lookupPolicy)).setter(setter(Builder::lookupPolicy))
.constructor(BatchLookupPolicy::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LookupPolicy").build()).build();
private static final SdkField LIST_INDEX_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("ListIndex").getter(getter(BatchReadOperation::listIndex)).setter(setter(Builder::listIndex))
.constructor(BatchListIndex::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListIndex").build()).build();
private static final SdkField LIST_OUTGOING_TYPED_LINKS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListOutgoingTypedLinks")
.getter(getter(BatchReadOperation::listOutgoingTypedLinks)).setter(setter(Builder::listOutgoingTypedLinks))
.constructor(BatchListOutgoingTypedLinks::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListOutgoingTypedLinks").build())
.build();
private static final SdkField LIST_INCOMING_TYPED_LINKS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ListIncomingTypedLinks")
.getter(getter(BatchReadOperation::listIncomingTypedLinks)).setter(setter(Builder::listIncomingTypedLinks))
.constructor(BatchListIncomingTypedLinks::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ListIncomingTypedLinks").build())
.build();
private static final SdkField GET_LINK_ATTRIBUTES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("GetLinkAttributes")
.getter(getter(BatchReadOperation::getLinkAttributes)).setter(setter(Builder::getLinkAttributes))
.constructor(BatchGetLinkAttributes::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GetLinkAttributes").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LIST_OBJECT_ATTRIBUTES_FIELD,
LIST_OBJECT_CHILDREN_FIELD, LIST_ATTACHED_INDICES_FIELD, LIST_OBJECT_PARENT_PATHS_FIELD,
GET_OBJECT_INFORMATION_FIELD, GET_OBJECT_ATTRIBUTES_FIELD, LIST_OBJECT_PARENTS_FIELD, LIST_OBJECT_POLICIES_FIELD,
LIST_POLICY_ATTACHMENTS_FIELD, LOOKUP_POLICY_FIELD, LIST_INDEX_FIELD, LIST_OUTGOING_TYPED_LINKS_FIELD,
LIST_INCOMING_TYPED_LINKS_FIELD, GET_LINK_ATTRIBUTES_FIELD));
private static final long serialVersionUID = 1L;
private final BatchListObjectAttributes listObjectAttributes;
private final BatchListObjectChildren listObjectChildren;
private final BatchListAttachedIndices listAttachedIndices;
private final BatchListObjectParentPaths listObjectParentPaths;
private final BatchGetObjectInformation getObjectInformation;
private final BatchGetObjectAttributes getObjectAttributes;
private final BatchListObjectParents listObjectParents;
private final BatchListObjectPolicies listObjectPolicies;
private final BatchListPolicyAttachments listPolicyAttachments;
private final BatchLookupPolicy lookupPolicy;
private final BatchListIndex listIndex;
private final BatchListOutgoingTypedLinks listOutgoingTypedLinks;
private final BatchListIncomingTypedLinks listIncomingTypedLinks;
private final BatchGetLinkAttributes getLinkAttributes;
private BatchReadOperation(BuilderImpl builder) {
this.listObjectAttributes = builder.listObjectAttributes;
this.listObjectChildren = builder.listObjectChildren;
this.listAttachedIndices = builder.listAttachedIndices;
this.listObjectParentPaths = builder.listObjectParentPaths;
this.getObjectInformation = builder.getObjectInformation;
this.getObjectAttributes = builder.getObjectAttributes;
this.listObjectParents = builder.listObjectParents;
this.listObjectPolicies = builder.listObjectPolicies;
this.listPolicyAttachments = builder.listPolicyAttachments;
this.lookupPolicy = builder.lookupPolicy;
this.listIndex = builder.listIndex;
this.listOutgoingTypedLinks = builder.listOutgoingTypedLinks;
this.listIncomingTypedLinks = builder.listIncomingTypedLinks;
this.getLinkAttributes = builder.getLinkAttributes;
}
/**
*
* Lists all attributes that are associated with an object.
*
*
* @return Lists all attributes that are associated with an object.
*/
public final BatchListObjectAttributes listObjectAttributes() {
return listObjectAttributes;
}
/**
*
* Returns a paginated list of child objects that are associated with a given object.
*
*
* @return Returns a paginated list of child objects that are associated with a given object.
*/
public final BatchListObjectChildren listObjectChildren() {
return listObjectChildren;
}
/**
*
* Lists indices attached to an object.
*
*
* @return Lists indices attached to an object.
*/
public final BatchListAttachedIndices listAttachedIndices() {
return listAttachedIndices;
}
/**
*
* Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index node
* objects. For more information about objects, see Directory Structure.
*
*
* @return Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index
* node objects. For more information about objects, see Directory Structure.
*/
public final BatchListObjectParentPaths listObjectParentPaths() {
return listObjectParentPaths;
}
/**
*
* Retrieves metadata about an object.
*
*
* @return Retrieves metadata about an object.
*/
public final BatchGetObjectInformation getObjectInformation() {
return getObjectInformation;
}
/**
*
* Retrieves attributes within a facet that are associated with an object.
*
*
* @return Retrieves attributes within a facet that are associated with an object.
*/
public final BatchGetObjectAttributes getObjectAttributes() {
return getObjectAttributes;
}
/**
* Returns the value of the ListObjectParents property for this object.
*
* @return The value of the ListObjectParents property for this object.
*/
public final BatchListObjectParents listObjectParents() {
return listObjectParents;
}
/**
*
* Returns policies attached to an object in pagination fashion.
*
*
* @return Returns policies attached to an object in pagination fashion.
*/
public final BatchListObjectPolicies listObjectPolicies() {
return listObjectPolicies;
}
/**
*
* Returns all of the ObjectIdentifiers to which a given policy is attached.
*
*
* @return Returns all of the ObjectIdentifiers to which a given policy is attached.
*/
public final BatchListPolicyAttachments listPolicyAttachments() {
return listPolicyAttachments;
}
/**
*
* Lists all policies from the root of the Directory to the object specified. If there are no policies
* present, an empty list is returned. If policies are present, and if some objects don't have the policies
* attached, it returns the ObjectIdentifier for such objects. If policies are present, it returns
* ObjectIdentifier, policyId, and policyType. Paths that don't lead to the
* root from the target object are ignored. For more information, see Policies.
*
*
* @return Lists all policies from the root of the Directory to the object specified. If there are no
* policies present, an empty list is returned. If policies are present, and if some objects don't have the
* policies attached, it returns the ObjectIdentifier for such objects. If policies are
* present, it returns ObjectIdentifier, policyId, and policyType.
* Paths that don't lead to the root from the target object are ignored. For more information, see Policies.
*/
public final BatchLookupPolicy lookupPolicy() {
return lookupPolicy;
}
/**
*
* Lists objects attached to the specified index.
*
*
* @return Lists objects attached to the specified index.
*/
public final BatchListIndex listIndex() {
return listIndex;
}
/**
*
* Returns a paginated list of all the outgoing TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*
*
* @return Returns a paginated list of all the outgoing TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*/
public final BatchListOutgoingTypedLinks listOutgoingTypedLinks() {
return listOutgoingTypedLinks;
}
/**
*
* Returns a paginated list of all the incoming TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*
*
* @return Returns a paginated list of all the incoming TypedLinkSpecifier information for an object. It also
* supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
*/
public final BatchListIncomingTypedLinks listIncomingTypedLinks() {
return listIncomingTypedLinks;
}
/**
*
* Retrieves attributes that are associated with a typed link.
*
*
* @return Retrieves attributes that are associated with a typed link.
*/
public final BatchGetLinkAttributes getLinkAttributes() {
return getLinkAttributes;
}
@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 + Objects.hashCode(listObjectAttributes());
hashCode = 31 * hashCode + Objects.hashCode(listObjectChildren());
hashCode = 31 * hashCode + Objects.hashCode(listAttachedIndices());
hashCode = 31 * hashCode + Objects.hashCode(listObjectParentPaths());
hashCode = 31 * hashCode + Objects.hashCode(getObjectInformation());
hashCode = 31 * hashCode + Objects.hashCode(getObjectAttributes());
hashCode = 31 * hashCode + Objects.hashCode(listObjectParents());
hashCode = 31 * hashCode + Objects.hashCode(listObjectPolicies());
hashCode = 31 * hashCode + Objects.hashCode(listPolicyAttachments());
hashCode = 31 * hashCode + Objects.hashCode(lookupPolicy());
hashCode = 31 * hashCode + Objects.hashCode(listIndex());
hashCode = 31 * hashCode + Objects.hashCode(listOutgoingTypedLinks());
hashCode = 31 * hashCode + Objects.hashCode(listIncomingTypedLinks());
hashCode = 31 * hashCode + Objects.hashCode(getLinkAttributes());
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 BatchReadOperation)) {
return false;
}
BatchReadOperation other = (BatchReadOperation) obj;
return Objects.equals(listObjectAttributes(), other.listObjectAttributes())
&& Objects.equals(listObjectChildren(), other.listObjectChildren())
&& Objects.equals(listAttachedIndices(), other.listAttachedIndices())
&& Objects.equals(listObjectParentPaths(), other.listObjectParentPaths())
&& Objects.equals(getObjectInformation(), other.getObjectInformation())
&& Objects.equals(getObjectAttributes(), other.getObjectAttributes())
&& Objects.equals(listObjectParents(), other.listObjectParents())
&& Objects.equals(listObjectPolicies(), other.listObjectPolicies())
&& Objects.equals(listPolicyAttachments(), other.listPolicyAttachments())
&& Objects.equals(lookupPolicy(), other.lookupPolicy()) && Objects.equals(listIndex(), other.listIndex())
&& Objects.equals(listOutgoingTypedLinks(), other.listOutgoingTypedLinks())
&& Objects.equals(listIncomingTypedLinks(), other.listIncomingTypedLinks())
&& Objects.equals(getLinkAttributes(), other.getLinkAttributes());
}
/**
* 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("BatchReadOperation").add("ListObjectAttributes", listObjectAttributes())
.add("ListObjectChildren", listObjectChildren()).add("ListAttachedIndices", listAttachedIndices())
.add("ListObjectParentPaths", listObjectParentPaths()).add("GetObjectInformation", getObjectInformation())
.add("GetObjectAttributes", getObjectAttributes()).add("ListObjectParents", listObjectParents())
.add("ListObjectPolicies", listObjectPolicies()).add("ListPolicyAttachments", listPolicyAttachments())
.add("LookupPolicy", lookupPolicy()).add("ListIndex", listIndex())
.add("ListOutgoingTypedLinks", listOutgoingTypedLinks()).add("ListIncomingTypedLinks", listIncomingTypedLinks())
.add("GetLinkAttributes", getLinkAttributes()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ListObjectAttributes":
return Optional.ofNullable(clazz.cast(listObjectAttributes()));
case "ListObjectChildren":
return Optional.ofNullable(clazz.cast(listObjectChildren()));
case "ListAttachedIndices":
return Optional.ofNullable(clazz.cast(listAttachedIndices()));
case "ListObjectParentPaths":
return Optional.ofNullable(clazz.cast(listObjectParentPaths()));
case "GetObjectInformation":
return Optional.ofNullable(clazz.cast(getObjectInformation()));
case "GetObjectAttributes":
return Optional.ofNullable(clazz.cast(getObjectAttributes()));
case "ListObjectParents":
return Optional.ofNullable(clazz.cast(listObjectParents()));
case "ListObjectPolicies":
return Optional.ofNullable(clazz.cast(listObjectPolicies()));
case "ListPolicyAttachments":
return Optional.ofNullable(clazz.cast(listPolicyAttachments()));
case "LookupPolicy":
return Optional.ofNullable(clazz.cast(lookupPolicy()));
case "ListIndex":
return Optional.ofNullable(clazz.cast(listIndex()));
case "ListOutgoingTypedLinks":
return Optional.ofNullable(clazz.cast(listOutgoingTypedLinks()));
case "ListIncomingTypedLinks":
return Optional.ofNullable(clazz.cast(listIncomingTypedLinks()));
case "GetLinkAttributes":
return Optional.ofNullable(clazz.cast(getLinkAttributes()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function