Please wait. This can take some minutes ...
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.
software.amazon.awssdk.services.clouddirectory.model.BatchWriteOperationResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Amazon CloudDirectory module holds the client classes that are used for
communicating with Amazon CloudDirectory Service
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
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 BatchWrite
response operation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class BatchWriteOperationResponse implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField CREATE_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CreateObject")
.getter(getter(BatchWriteOperationResponse::createObject)).setter(setter(Builder::createObject))
.constructor(BatchCreateObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreateObject").build()).build();
private static final SdkField ATTACH_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AttachObject")
.getter(getter(BatchWriteOperationResponse::attachObject)).setter(setter(Builder::attachObject))
.constructor(BatchAttachObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttachObject").build()).build();
private static final SdkField DETACH_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DetachObject")
.getter(getter(BatchWriteOperationResponse::detachObject)).setter(setter(Builder::detachObject))
.constructor(BatchDetachObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DetachObject").build()).build();
private static final SdkField UPDATE_OBJECT_ATTRIBUTES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("UpdateObjectAttributes")
.getter(getter(BatchWriteOperationResponse::updateObjectAttributes)).setter(setter(Builder::updateObjectAttributes))
.constructor(BatchUpdateObjectAttributesResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdateObjectAttributes").build())
.build();
private static final SdkField DELETE_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DeleteObject")
.getter(getter(BatchWriteOperationResponse::deleteObject)).setter(setter(Builder::deleteObject))
.constructor(BatchDeleteObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeleteObject").build()).build();
private static final SdkField ADD_FACET_TO_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AddFacetToObject")
.getter(getter(BatchWriteOperationResponse::addFacetToObject)).setter(setter(Builder::addFacetToObject))
.constructor(BatchAddFacetToObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AddFacetToObject").build()).build();
private static final SdkField REMOVE_FACET_FROM_OBJECT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RemoveFacetFromObject")
.getter(getter(BatchWriteOperationResponse::removeFacetFromObject)).setter(setter(Builder::removeFacetFromObject))
.constructor(BatchRemoveFacetFromObjectResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RemoveFacetFromObject").build())
.build();
private static final SdkField ATTACH_POLICY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AttachPolicy")
.getter(getter(BatchWriteOperationResponse::attachPolicy)).setter(setter(Builder::attachPolicy))
.constructor(BatchAttachPolicyResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttachPolicy").build()).build();
private static final SdkField DETACH_POLICY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DetachPolicy")
.getter(getter(BatchWriteOperationResponse::detachPolicy)).setter(setter(Builder::detachPolicy))
.constructor(BatchDetachPolicyResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DetachPolicy").build()).build();
private static final SdkField CREATE_INDEX_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CreateIndex")
.getter(getter(BatchWriteOperationResponse::createIndex)).setter(setter(Builder::createIndex))
.constructor(BatchCreateIndexResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreateIndex").build()).build();
private static final SdkField ATTACH_TO_INDEX_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AttachToIndex")
.getter(getter(BatchWriteOperationResponse::attachToIndex)).setter(setter(Builder::attachToIndex))
.constructor(BatchAttachToIndexResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttachToIndex").build()).build();
private static final SdkField DETACH_FROM_INDEX_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DetachFromIndex")
.getter(getter(BatchWriteOperationResponse::detachFromIndex)).setter(setter(Builder::detachFromIndex))
.constructor(BatchDetachFromIndexResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DetachFromIndex").build()).build();
private static final SdkField ATTACH_TYPED_LINK_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AttachTypedLink")
.getter(getter(BatchWriteOperationResponse::attachTypedLink)).setter(setter(Builder::attachTypedLink))
.constructor(BatchAttachTypedLinkResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttachTypedLink").build()).build();
private static final SdkField DETACH_TYPED_LINK_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DetachTypedLink")
.getter(getter(BatchWriteOperationResponse::detachTypedLink)).setter(setter(Builder::detachTypedLink))
.constructor(BatchDetachTypedLinkResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DetachTypedLink").build()).build();
private static final SdkField UPDATE_LINK_ATTRIBUTES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("UpdateLinkAttributes")
.getter(getter(BatchWriteOperationResponse::updateLinkAttributes)).setter(setter(Builder::updateLinkAttributes))
.constructor(BatchUpdateLinkAttributesResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdateLinkAttributes").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATE_OBJECT_FIELD,
ATTACH_OBJECT_FIELD, DETACH_OBJECT_FIELD, UPDATE_OBJECT_ATTRIBUTES_FIELD, DELETE_OBJECT_FIELD,
ADD_FACET_TO_OBJECT_FIELD, REMOVE_FACET_FROM_OBJECT_FIELD, ATTACH_POLICY_FIELD, DETACH_POLICY_FIELD,
CREATE_INDEX_FIELD, ATTACH_TO_INDEX_FIELD, DETACH_FROM_INDEX_FIELD, ATTACH_TYPED_LINK_FIELD, DETACH_TYPED_LINK_FIELD,
UPDATE_LINK_ATTRIBUTES_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("CreateObject", CREATE_OBJECT_FIELD);
put("AttachObject", ATTACH_OBJECT_FIELD);
put("DetachObject", DETACH_OBJECT_FIELD);
put("UpdateObjectAttributes", UPDATE_OBJECT_ATTRIBUTES_FIELD);
put("DeleteObject", DELETE_OBJECT_FIELD);
put("AddFacetToObject", ADD_FACET_TO_OBJECT_FIELD);
put("RemoveFacetFromObject", REMOVE_FACET_FROM_OBJECT_FIELD);
put("AttachPolicy", ATTACH_POLICY_FIELD);
put("DetachPolicy", DETACH_POLICY_FIELD);
put("CreateIndex", CREATE_INDEX_FIELD);
put("AttachToIndex", ATTACH_TO_INDEX_FIELD);
put("DetachFromIndex", DETACH_FROM_INDEX_FIELD);
put("AttachTypedLink", ATTACH_TYPED_LINK_FIELD);
put("DetachTypedLink", DETACH_TYPED_LINK_FIELD);
put("UpdateLinkAttributes", UPDATE_LINK_ATTRIBUTES_FIELD);
}
});
private static final long serialVersionUID = 1L;
private final BatchCreateObjectResponse createObject;
private final BatchAttachObjectResponse attachObject;
private final BatchDetachObjectResponse detachObject;
private final BatchUpdateObjectAttributesResponse updateObjectAttributes;
private final BatchDeleteObjectResponse deleteObject;
private final BatchAddFacetToObjectResponse addFacetToObject;
private final BatchRemoveFacetFromObjectResponse removeFacetFromObject;
private final BatchAttachPolicyResponse attachPolicy;
private final BatchDetachPolicyResponse detachPolicy;
private final BatchCreateIndexResponse createIndex;
private final BatchAttachToIndexResponse attachToIndex;
private final BatchDetachFromIndexResponse detachFromIndex;
private final BatchAttachTypedLinkResponse attachTypedLink;
private final BatchDetachTypedLinkResponse detachTypedLink;
private final BatchUpdateLinkAttributesResponse updateLinkAttributes;
private BatchWriteOperationResponse(BuilderImpl builder) {
this.createObject = builder.createObject;
this.attachObject = builder.attachObject;
this.detachObject = builder.detachObject;
this.updateObjectAttributes = builder.updateObjectAttributes;
this.deleteObject = builder.deleteObject;
this.addFacetToObject = builder.addFacetToObject;
this.removeFacetFromObject = builder.removeFacetFromObject;
this.attachPolicy = builder.attachPolicy;
this.detachPolicy = builder.detachPolicy;
this.createIndex = builder.createIndex;
this.attachToIndex = builder.attachToIndex;
this.detachFromIndex = builder.detachFromIndex;
this.attachTypedLink = builder.attachTypedLink;
this.detachTypedLink = builder.detachTypedLink;
this.updateLinkAttributes = builder.updateLinkAttributes;
}
/**
*
* Creates an object in a Directory .
*
*
* @return Creates an object in a Directory .
*/
public final BatchCreateObjectResponse createObject() {
return createObject;
}
/**
*
* Attaches an object to a Directory .
*
*
* @return Attaches an object to a Directory .
*/
public final BatchAttachObjectResponse attachObject() {
return attachObject;
}
/**
*
* Detaches an object from a Directory .
*
*
* @return Detaches an object from a Directory .
*/
public final BatchDetachObjectResponse detachObject() {
return detachObject;
}
/**
*
* Updates a given object’s attributes.
*
*
* @return Updates a given object’s attributes.
*/
public final BatchUpdateObjectAttributesResponse updateObjectAttributes() {
return updateObjectAttributes;
}
/**
*
* Deletes an object in a Directory .
*
*
* @return Deletes an object in a Directory .
*/
public final BatchDeleteObjectResponse deleteObject() {
return deleteObject;
}
/**
*
* The result of an add facet to object batch operation.
*
*
* @return The result of an add facet to object batch operation.
*/
public final BatchAddFacetToObjectResponse addFacetToObject() {
return addFacetToObject;
}
/**
*
* The result of a batch remove facet from object operation.
*
*
* @return The result of a batch remove facet from object operation.
*/
public final BatchRemoveFacetFromObjectResponse removeFacetFromObject() {
return removeFacetFromObject;
}
/**
*
* Attaches a policy object to a regular object. An object can have a limited number of attached policies.
*
*
* @return Attaches a policy object to a regular object. An object can have a limited number of attached policies.
*/
public final BatchAttachPolicyResponse attachPolicy() {
return attachPolicy;
}
/**
*
* Detaches a policy from a Directory .
*
*
* @return Detaches a policy from a Directory .
*/
public final BatchDetachPolicyResponse detachPolicy() {
return detachPolicy;
}
/**
*
* Creates an index object. See Indexing and
* search for more information.
*
*
* @return Creates an index object. See Indexing and
* search for more information.
*/
public final BatchCreateIndexResponse createIndex() {
return createIndex;
}
/**
*
* Attaches the specified object to the specified index.
*
*
* @return Attaches the specified object to the specified index.
*/
public final BatchAttachToIndexResponse attachToIndex() {
return attachToIndex;
}
/**
*
* Detaches the specified object from the specified index.
*
*
* @return Detaches the specified object from the specified index.
*/
public final BatchDetachFromIndexResponse detachFromIndex() {
return detachFromIndex;
}
/**
*
* Attaches a typed link to a specified source and target object. For more information, see Typed Links .
*
*
* @return Attaches a typed link to a specified source and target object. For more information, see Typed Links .
*/
public final BatchAttachTypedLinkResponse attachTypedLink() {
return attachTypedLink;
}
/**
*
* Detaches a typed link from a specified source and target object. For more information, see Typed Links .
*
*
* @return Detaches a typed link from a specified source and target object. For more information, see Typed Links .
*/
public final BatchDetachTypedLinkResponse detachTypedLink() {
return detachTypedLink;
}
/**
*
* Represents the output of a BatchWrite
response operation.
*
*
* @return Represents the output of a BatchWrite
response operation.
*/
public final BatchUpdateLinkAttributesResponse updateLinkAttributes() {
return updateLinkAttributes;
}
@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(createObject());
hashCode = 31 * hashCode + Objects.hashCode(attachObject());
hashCode = 31 * hashCode + Objects.hashCode(detachObject());
hashCode = 31 * hashCode + Objects.hashCode(updateObjectAttributes());
hashCode = 31 * hashCode + Objects.hashCode(deleteObject());
hashCode = 31 * hashCode + Objects.hashCode(addFacetToObject());
hashCode = 31 * hashCode + Objects.hashCode(removeFacetFromObject());
hashCode = 31 * hashCode + Objects.hashCode(attachPolicy());
hashCode = 31 * hashCode + Objects.hashCode(detachPolicy());
hashCode = 31 * hashCode + Objects.hashCode(createIndex());
hashCode = 31 * hashCode + Objects.hashCode(attachToIndex());
hashCode = 31 * hashCode + Objects.hashCode(detachFromIndex());
hashCode = 31 * hashCode + Objects.hashCode(attachTypedLink());
hashCode = 31 * hashCode + Objects.hashCode(detachTypedLink());
hashCode = 31 * hashCode + Objects.hashCode(updateLinkAttributes());
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 BatchWriteOperationResponse)) {
return false;
}
BatchWriteOperationResponse other = (BatchWriteOperationResponse) obj;
return Objects.equals(createObject(), other.createObject()) && Objects.equals(attachObject(), other.attachObject())
&& Objects.equals(detachObject(), other.detachObject())
&& Objects.equals(updateObjectAttributes(), other.updateObjectAttributes())
&& Objects.equals(deleteObject(), other.deleteObject())
&& Objects.equals(addFacetToObject(), other.addFacetToObject())
&& Objects.equals(removeFacetFromObject(), other.removeFacetFromObject())
&& Objects.equals(attachPolicy(), other.attachPolicy()) && Objects.equals(detachPolicy(), other.detachPolicy())
&& Objects.equals(createIndex(), other.createIndex()) && Objects.equals(attachToIndex(), other.attachToIndex())
&& Objects.equals(detachFromIndex(), other.detachFromIndex())
&& Objects.equals(attachTypedLink(), other.attachTypedLink())
&& Objects.equals(detachTypedLink(), other.detachTypedLink())
&& Objects.equals(updateLinkAttributes(), other.updateLinkAttributes());
}
/**
* 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("BatchWriteOperationResponse").add("CreateObject", createObject())
.add("AttachObject", attachObject()).add("DetachObject", detachObject())
.add("UpdateObjectAttributes", updateObjectAttributes()).add("DeleteObject", deleteObject())
.add("AddFacetToObject", addFacetToObject()).add("RemoveFacetFromObject", removeFacetFromObject())
.add("AttachPolicy", attachPolicy()).add("DetachPolicy", detachPolicy()).add("CreateIndex", createIndex())
.add("AttachToIndex", attachToIndex()).add("DetachFromIndex", detachFromIndex())
.add("AttachTypedLink", attachTypedLink()).add("DetachTypedLink", detachTypedLink())
.add("UpdateLinkAttributes", updateLinkAttributes()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "CreateObject":
return Optional.ofNullable(clazz.cast(createObject()));
case "AttachObject":
return Optional.ofNullable(clazz.cast(attachObject()));
case "DetachObject":
return Optional.ofNullable(clazz.cast(detachObject()));
case "UpdateObjectAttributes":
return Optional.ofNullable(clazz.cast(updateObjectAttributes()));
case "DeleteObject":
return Optional.ofNullable(clazz.cast(deleteObject()));
case "AddFacetToObject":
return Optional.ofNullable(clazz.cast(addFacetToObject()));
case "RemoveFacetFromObject":
return Optional.ofNullable(clazz.cast(removeFacetFromObject()));
case "AttachPolicy":
return Optional.ofNullable(clazz.cast(attachPolicy()));
case "DetachPolicy":
return Optional.ofNullable(clazz.cast(detachPolicy()));
case "CreateIndex":
return Optional.ofNullable(clazz.cast(createIndex()));
case "AttachToIndex":
return Optional.ofNullable(clazz.cast(attachToIndex()));
case "DetachFromIndex":
return Optional.ofNullable(clazz.cast(detachFromIndex()));
case "AttachTypedLink":
return Optional.ofNullable(clazz.cast(attachTypedLink()));
case "DetachTypedLink":
return Optional.ofNullable(clazz.cast(detachTypedLink()));
case "UpdateLinkAttributes":
return Optional.ofNullable(clazz.cast(updateLinkAttributes()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Function getter(Function g) {
return obj -> g.apply((BatchWriteOperationResponse) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* Creates an object in a Directory .
*
*
* @param createObject
* Creates an object in a Directory .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createObject(BatchCreateObjectResponse createObject);
/**
*
* Creates an object in a Directory .
*
* This is a convenience method that creates an instance of the {@link BatchCreateObjectResponse.Builder}
* avoiding the need to create one manually via {@link BatchCreateObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchCreateObjectResponse.Builder#build()} is called immediately
* and its result is passed to {@link #createObject(BatchCreateObjectResponse)}.
*
* @param createObject
* a consumer that will call methods on {@link BatchCreateObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #createObject(BatchCreateObjectResponse)
*/
default Builder createObject(Consumer createObject) {
return createObject(BatchCreateObjectResponse.builder().applyMutation(createObject).build());
}
/**
*
* Attaches an object to a Directory .
*
*
* @param attachObject
* Attaches an object to a Directory .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attachObject(BatchAttachObjectResponse attachObject);
/**
*
* Attaches an object to a Directory .
*
* This is a convenience method that creates an instance of the {@link BatchAttachObjectResponse.Builder}
* avoiding the need to create one manually via {@link BatchAttachObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchAttachObjectResponse.Builder#build()} is called immediately
* and its result is passed to {@link #attachObject(BatchAttachObjectResponse)}.
*
* @param attachObject
* a consumer that will call methods on {@link BatchAttachObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #attachObject(BatchAttachObjectResponse)
*/
default Builder attachObject(Consumer attachObject) {
return attachObject(BatchAttachObjectResponse.builder().applyMutation(attachObject).build());
}
/**
*
* Detaches an object from a Directory .
*
*
* @param detachObject
* Detaches an object from a Directory .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder detachObject(BatchDetachObjectResponse detachObject);
/**
*
* Detaches an object from a Directory .
*
* This is a convenience method that creates an instance of the {@link BatchDetachObjectResponse.Builder}
* avoiding the need to create one manually via {@link BatchDetachObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchDetachObjectResponse.Builder#build()} is called immediately
* and its result is passed to {@link #detachObject(BatchDetachObjectResponse)}.
*
* @param detachObject
* a consumer that will call methods on {@link BatchDetachObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #detachObject(BatchDetachObjectResponse)
*/
default Builder detachObject(Consumer detachObject) {
return detachObject(BatchDetachObjectResponse.builder().applyMutation(detachObject).build());
}
/**
*
* Updates a given object’s attributes.
*
*
* @param updateObjectAttributes
* Updates a given object’s attributes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder updateObjectAttributes(BatchUpdateObjectAttributesResponse updateObjectAttributes);
/**
*
* Updates a given object’s attributes.
*
* This is a convenience method that creates an instance of the
* {@link BatchUpdateObjectAttributesResponse.Builder} avoiding the need to create one manually via
* {@link BatchUpdateObjectAttributesResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchUpdateObjectAttributesResponse.Builder#build()} is called
* immediately and its result is passed to {@link #updateObjectAttributes(BatchUpdateObjectAttributesResponse)}.
*
* @param updateObjectAttributes
* a consumer that will call methods on {@link BatchUpdateObjectAttributesResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #updateObjectAttributes(BatchUpdateObjectAttributesResponse)
*/
default Builder updateObjectAttributes(Consumer updateObjectAttributes) {
return updateObjectAttributes(BatchUpdateObjectAttributesResponse.builder().applyMutation(updateObjectAttributes)
.build());
}
/**
*
* Deletes an object in a Directory .
*
*
* @param deleteObject
* Deletes an object in a Directory .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder deleteObject(BatchDeleteObjectResponse deleteObject);
/**
*
* Deletes an object in a Directory .
*
* This is a convenience method that creates an instance of the {@link BatchDeleteObjectResponse.Builder}
* avoiding the need to create one manually via {@link BatchDeleteObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchDeleteObjectResponse.Builder#build()} is called immediately
* and its result is passed to {@link #deleteObject(BatchDeleteObjectResponse)}.
*
* @param deleteObject
* a consumer that will call methods on {@link BatchDeleteObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #deleteObject(BatchDeleteObjectResponse)
*/
default Builder deleteObject(Consumer deleteObject) {
return deleteObject(BatchDeleteObjectResponse.builder().applyMutation(deleteObject).build());
}
/**
*
* The result of an add facet to object batch operation.
*
*
* @param addFacetToObject
* The result of an add facet to object batch operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder addFacetToObject(BatchAddFacetToObjectResponse addFacetToObject);
/**
*
* The result of an add facet to object batch operation.
*
* This is a convenience method that creates an instance of the {@link BatchAddFacetToObjectResponse.Builder}
* avoiding the need to create one manually via {@link BatchAddFacetToObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchAddFacetToObjectResponse.Builder#build()} is called
* immediately and its result is passed to {@link #addFacetToObject(BatchAddFacetToObjectResponse)}.
*
* @param addFacetToObject
* a consumer that will call methods on {@link BatchAddFacetToObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #addFacetToObject(BatchAddFacetToObjectResponse)
*/
default Builder addFacetToObject(Consumer addFacetToObject) {
return addFacetToObject(BatchAddFacetToObjectResponse.builder().applyMutation(addFacetToObject).build());
}
/**
*
* The result of a batch remove facet from object operation.
*
*
* @param removeFacetFromObject
* The result of a batch remove facet from object operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder removeFacetFromObject(BatchRemoveFacetFromObjectResponse removeFacetFromObject);
/**
*
* The result of a batch remove facet from object operation.
*
* This is a convenience method that creates an instance of the
* {@link BatchRemoveFacetFromObjectResponse.Builder} avoiding the need to create one manually via
* {@link BatchRemoveFacetFromObjectResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchRemoveFacetFromObjectResponse.Builder#build()} is called
* immediately and its result is passed to {@link #removeFacetFromObject(BatchRemoveFacetFromObjectResponse)}.
*
* @param removeFacetFromObject
* a consumer that will call methods on {@link BatchRemoveFacetFromObjectResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #removeFacetFromObject(BatchRemoveFacetFromObjectResponse)
*/
default Builder removeFacetFromObject(Consumer removeFacetFromObject) {
return removeFacetFromObject(BatchRemoveFacetFromObjectResponse.builder().applyMutation(removeFacetFromObject)
.build());
}
/**
*
* Attaches a policy object to a regular object. An object can have a limited number of attached policies.
*
*
* @param attachPolicy
* Attaches a policy object to a regular object. An object can have a limited number of attached
* policies.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attachPolicy(BatchAttachPolicyResponse attachPolicy);
/**
*
* Attaches a policy object to a regular object. An object can have a limited number of attached policies.
*
* This is a convenience method that creates an instance of the {@link BatchAttachPolicyResponse.Builder}
* avoiding the need to create one manually via {@link BatchAttachPolicyResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchAttachPolicyResponse.Builder#build()} is called immediately
* and its result is passed to {@link #attachPolicy(BatchAttachPolicyResponse)}.
*
* @param attachPolicy
* a consumer that will call methods on {@link BatchAttachPolicyResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #attachPolicy(BatchAttachPolicyResponse)
*/
default Builder attachPolicy(Consumer attachPolicy) {
return attachPolicy(BatchAttachPolicyResponse.builder().applyMutation(attachPolicy).build());
}
/**
*
* Detaches a policy from a Directory .
*
*
* @param detachPolicy
* Detaches a policy from a Directory .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder detachPolicy(BatchDetachPolicyResponse detachPolicy);
/**
*
* Detaches a policy from a Directory .
*
* This is a convenience method that creates an instance of the {@link BatchDetachPolicyResponse.Builder}
* avoiding the need to create one manually via {@link BatchDetachPolicyResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchDetachPolicyResponse.Builder#build()} is called immediately
* and its result is passed to {@link #detachPolicy(BatchDetachPolicyResponse)}.
*
* @param detachPolicy
* a consumer that will call methods on {@link BatchDetachPolicyResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #detachPolicy(BatchDetachPolicyResponse)
*/
default Builder detachPolicy(Consumer detachPolicy) {
return detachPolicy(BatchDetachPolicyResponse.builder().applyMutation(detachPolicy).build());
}
/**
*
* Creates an index object. See Indexing and
* search for more information.
*
*
* @param createIndex
* Creates an index object. See Indexing
* and search for more information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createIndex(BatchCreateIndexResponse createIndex);
/**
*
* Creates an index object. See Indexing and
* search for more information.
*
* This is a convenience method that creates an instance of the {@link BatchCreateIndexResponse.Builder}
* avoiding the need to create one manually via {@link BatchCreateIndexResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchCreateIndexResponse.Builder#build()} is called immediately
* and its result is passed to {@link #createIndex(BatchCreateIndexResponse)}.
*
* @param createIndex
* a consumer that will call methods on {@link BatchCreateIndexResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #createIndex(BatchCreateIndexResponse)
*/
default Builder createIndex(Consumer createIndex) {
return createIndex(BatchCreateIndexResponse.builder().applyMutation(createIndex).build());
}
/**
*
* Attaches the specified object to the specified index.
*
*
* @param attachToIndex
* Attaches the specified object to the specified index.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attachToIndex(BatchAttachToIndexResponse attachToIndex);
/**
*
* Attaches the specified object to the specified index.
*
* This is a convenience method that creates an instance of the {@link BatchAttachToIndexResponse.Builder}
* avoiding the need to create one manually via {@link BatchAttachToIndexResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchAttachToIndexResponse.Builder#build()} is called immediately
* and its result is passed to {@link #attachToIndex(BatchAttachToIndexResponse)}.
*
* @param attachToIndex
* a consumer that will call methods on {@link BatchAttachToIndexResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #attachToIndex(BatchAttachToIndexResponse)
*/
default Builder attachToIndex(Consumer attachToIndex) {
return attachToIndex(BatchAttachToIndexResponse.builder().applyMutation(attachToIndex).build());
}
/**
*
* Detaches the specified object from the specified index.
*
*
* @param detachFromIndex
* Detaches the specified object from the specified index.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder detachFromIndex(BatchDetachFromIndexResponse detachFromIndex);
/**
*
* Detaches the specified object from the specified index.
*
* This is a convenience method that creates an instance of the {@link BatchDetachFromIndexResponse.Builder}
* avoiding the need to create one manually via {@link BatchDetachFromIndexResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchDetachFromIndexResponse.Builder#build()} is called
* immediately and its result is passed to {@link #detachFromIndex(BatchDetachFromIndexResponse)}.
*
* @param detachFromIndex
* a consumer that will call methods on {@link BatchDetachFromIndexResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #detachFromIndex(BatchDetachFromIndexResponse)
*/
default Builder detachFromIndex(Consumer detachFromIndex) {
return detachFromIndex(BatchDetachFromIndexResponse.builder().applyMutation(detachFromIndex).build());
}
/**
*
* Attaches a typed link to a specified source and target object. For more information, see Typed Links .
*
*
* @param attachTypedLink
* Attaches a typed link to a specified source and target object. For more information, see Typed Links .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attachTypedLink(BatchAttachTypedLinkResponse attachTypedLink);
/**
*
* Attaches a typed link to a specified source and target object. For more information, see Typed Links .
*
* This is a convenience method that creates an instance of the {@link BatchAttachTypedLinkResponse.Builder}
* avoiding the need to create one manually via {@link BatchAttachTypedLinkResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchAttachTypedLinkResponse.Builder#build()} is called
* immediately and its result is passed to {@link #attachTypedLink(BatchAttachTypedLinkResponse)}.
*
* @param attachTypedLink
* a consumer that will call methods on {@link BatchAttachTypedLinkResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #attachTypedLink(BatchAttachTypedLinkResponse)
*/
default Builder attachTypedLink(Consumer attachTypedLink) {
return attachTypedLink(BatchAttachTypedLinkResponse.builder().applyMutation(attachTypedLink).build());
}
/**
*
* Detaches a typed link from a specified source and target object. For more information, see Typed Links .
*
*
* @param detachTypedLink
* Detaches a typed link from a specified source and target object. For more information, see Typed Links .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder detachTypedLink(BatchDetachTypedLinkResponse detachTypedLink);
/**
*
* Detaches a typed link from a specified source and target object. For more information, see Typed Links .
*
* This is a convenience method that creates an instance of the {@link BatchDetachTypedLinkResponse.Builder}
* avoiding the need to create one manually via {@link BatchDetachTypedLinkResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchDetachTypedLinkResponse.Builder#build()} is called
* immediately and its result is passed to {@link #detachTypedLink(BatchDetachTypedLinkResponse)}.
*
* @param detachTypedLink
* a consumer that will call methods on {@link BatchDetachTypedLinkResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #detachTypedLink(BatchDetachTypedLinkResponse)
*/
default Builder detachTypedLink(Consumer detachTypedLink) {
return detachTypedLink(BatchDetachTypedLinkResponse.builder().applyMutation(detachTypedLink).build());
}
/**
*
* Represents the output of a BatchWrite
response operation.
*
*
* @param updateLinkAttributes
* Represents the output of a BatchWrite
response operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder updateLinkAttributes(BatchUpdateLinkAttributesResponse updateLinkAttributes);
/**
*
* Represents the output of a BatchWrite
response operation.
*
* This is a convenience method that creates an instance of the
* {@link BatchUpdateLinkAttributesResponse.Builder} avoiding the need to create one manually via
* {@link BatchUpdateLinkAttributesResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link BatchUpdateLinkAttributesResponse.Builder#build()} is called
* immediately and its result is passed to {@link #updateLinkAttributes(BatchUpdateLinkAttributesResponse)}.
*
* @param updateLinkAttributes
* a consumer that will call methods on {@link BatchUpdateLinkAttributesResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #updateLinkAttributes(BatchUpdateLinkAttributesResponse)
*/
default Builder updateLinkAttributes(Consumer updateLinkAttributes) {
return updateLinkAttributes(BatchUpdateLinkAttributesResponse.builder().applyMutation(updateLinkAttributes).build());
}
}
static final class BuilderImpl implements Builder {
private BatchCreateObjectResponse createObject;
private BatchAttachObjectResponse attachObject;
private BatchDetachObjectResponse detachObject;
private BatchUpdateObjectAttributesResponse updateObjectAttributes;
private BatchDeleteObjectResponse deleteObject;
private BatchAddFacetToObjectResponse addFacetToObject;
private BatchRemoveFacetFromObjectResponse removeFacetFromObject;
private BatchAttachPolicyResponse attachPolicy;
private BatchDetachPolicyResponse detachPolicy;
private BatchCreateIndexResponse createIndex;
private BatchAttachToIndexResponse attachToIndex;
private BatchDetachFromIndexResponse detachFromIndex;
private BatchAttachTypedLinkResponse attachTypedLink;
private BatchDetachTypedLinkResponse detachTypedLink;
private BatchUpdateLinkAttributesResponse updateLinkAttributes;
private BuilderImpl() {
}
private BuilderImpl(BatchWriteOperationResponse model) {
createObject(model.createObject);
attachObject(model.attachObject);
detachObject(model.detachObject);
updateObjectAttributes(model.updateObjectAttributes);
deleteObject(model.deleteObject);
addFacetToObject(model.addFacetToObject);
removeFacetFromObject(model.removeFacetFromObject);
attachPolicy(model.attachPolicy);
detachPolicy(model.detachPolicy);
createIndex(model.createIndex);
attachToIndex(model.attachToIndex);
detachFromIndex(model.detachFromIndex);
attachTypedLink(model.attachTypedLink);
detachTypedLink(model.detachTypedLink);
updateLinkAttributes(model.updateLinkAttributes);
}
public final BatchCreateObjectResponse.Builder getCreateObject() {
return createObject != null ? createObject.toBuilder() : null;
}
public final void setCreateObject(BatchCreateObjectResponse.BuilderImpl createObject) {
this.createObject = createObject != null ? createObject.build() : null;
}
@Override
public final Builder createObject(BatchCreateObjectResponse createObject) {
this.createObject = createObject;
return this;
}
public final BatchAttachObjectResponse.Builder getAttachObject() {
return attachObject != null ? attachObject.toBuilder() : null;
}
public final void setAttachObject(BatchAttachObjectResponse.BuilderImpl attachObject) {
this.attachObject = attachObject != null ? attachObject.build() : null;
}
@Override
public final Builder attachObject(BatchAttachObjectResponse attachObject) {
this.attachObject = attachObject;
return this;
}
public final BatchDetachObjectResponse.Builder getDetachObject() {
return detachObject != null ? detachObject.toBuilder() : null;
}
public final void setDetachObject(BatchDetachObjectResponse.BuilderImpl detachObject) {
this.detachObject = detachObject != null ? detachObject.build() : null;
}
@Override
public final Builder detachObject(BatchDetachObjectResponse detachObject) {
this.detachObject = detachObject;
return this;
}
public final BatchUpdateObjectAttributesResponse.Builder getUpdateObjectAttributes() {
return updateObjectAttributes != null ? updateObjectAttributes.toBuilder() : null;
}
public final void setUpdateObjectAttributes(BatchUpdateObjectAttributesResponse.BuilderImpl updateObjectAttributes) {
this.updateObjectAttributes = updateObjectAttributes != null ? updateObjectAttributes.build() : null;
}
@Override
public final Builder updateObjectAttributes(BatchUpdateObjectAttributesResponse updateObjectAttributes) {
this.updateObjectAttributes = updateObjectAttributes;
return this;
}
public final BatchDeleteObjectResponse.Builder getDeleteObject() {
return deleteObject != null ? deleteObject.toBuilder() : null;
}
public final void setDeleteObject(BatchDeleteObjectResponse.BuilderImpl deleteObject) {
this.deleteObject = deleteObject != null ? deleteObject.build() : null;
}
@Override
public final Builder deleteObject(BatchDeleteObjectResponse deleteObject) {
this.deleteObject = deleteObject;
return this;
}
public final BatchAddFacetToObjectResponse.Builder getAddFacetToObject() {
return addFacetToObject != null ? addFacetToObject.toBuilder() : null;
}
public final void setAddFacetToObject(BatchAddFacetToObjectResponse.BuilderImpl addFacetToObject) {
this.addFacetToObject = addFacetToObject != null ? addFacetToObject.build() : null;
}
@Override
public final Builder addFacetToObject(BatchAddFacetToObjectResponse addFacetToObject) {
this.addFacetToObject = addFacetToObject;
return this;
}
public final BatchRemoveFacetFromObjectResponse.Builder getRemoveFacetFromObject() {
return removeFacetFromObject != null ? removeFacetFromObject.toBuilder() : null;
}
public final void setRemoveFacetFromObject(BatchRemoveFacetFromObjectResponse.BuilderImpl removeFacetFromObject) {
this.removeFacetFromObject = removeFacetFromObject != null ? removeFacetFromObject.build() : null;
}
@Override
public final Builder removeFacetFromObject(BatchRemoveFacetFromObjectResponse removeFacetFromObject) {
this.removeFacetFromObject = removeFacetFromObject;
return this;
}
public final BatchAttachPolicyResponse.Builder getAttachPolicy() {
return attachPolicy != null ? attachPolicy.toBuilder() : null;
}
public final void setAttachPolicy(BatchAttachPolicyResponse.BuilderImpl attachPolicy) {
this.attachPolicy = attachPolicy != null ? attachPolicy.build() : null;
}
@Override
public final Builder attachPolicy(BatchAttachPolicyResponse attachPolicy) {
this.attachPolicy = attachPolicy;
return this;
}
public final BatchDetachPolicyResponse.Builder getDetachPolicy() {
return detachPolicy != null ? detachPolicy.toBuilder() : null;
}
public final void setDetachPolicy(BatchDetachPolicyResponse.BuilderImpl detachPolicy) {
this.detachPolicy = detachPolicy != null ? detachPolicy.build() : null;
}
@Override
public final Builder detachPolicy(BatchDetachPolicyResponse detachPolicy) {
this.detachPolicy = detachPolicy;
return this;
}
public final BatchCreateIndexResponse.Builder getCreateIndex() {
return createIndex != null ? createIndex.toBuilder() : null;
}
public final void setCreateIndex(BatchCreateIndexResponse.BuilderImpl createIndex) {
this.createIndex = createIndex != null ? createIndex.build() : null;
}
@Override
public final Builder createIndex(BatchCreateIndexResponse createIndex) {
this.createIndex = createIndex;
return this;
}
public final BatchAttachToIndexResponse.Builder getAttachToIndex() {
return attachToIndex != null ? attachToIndex.toBuilder() : null;
}
public final void setAttachToIndex(BatchAttachToIndexResponse.BuilderImpl attachToIndex) {
this.attachToIndex = attachToIndex != null ? attachToIndex.build() : null;
}
@Override
public final Builder attachToIndex(BatchAttachToIndexResponse attachToIndex) {
this.attachToIndex = attachToIndex;
return this;
}
public final BatchDetachFromIndexResponse.Builder getDetachFromIndex() {
return detachFromIndex != null ? detachFromIndex.toBuilder() : null;
}
public final void setDetachFromIndex(BatchDetachFromIndexResponse.BuilderImpl detachFromIndex) {
this.detachFromIndex = detachFromIndex != null ? detachFromIndex.build() : null;
}
@Override
public final Builder detachFromIndex(BatchDetachFromIndexResponse detachFromIndex) {
this.detachFromIndex = detachFromIndex;
return this;
}
public final BatchAttachTypedLinkResponse.Builder getAttachTypedLink() {
return attachTypedLink != null ? attachTypedLink.toBuilder() : null;
}
public final void setAttachTypedLink(BatchAttachTypedLinkResponse.BuilderImpl attachTypedLink) {
this.attachTypedLink = attachTypedLink != null ? attachTypedLink.build() : null;
}
@Override
public final Builder attachTypedLink(BatchAttachTypedLinkResponse attachTypedLink) {
this.attachTypedLink = attachTypedLink;
return this;
}
public final BatchDetachTypedLinkResponse.Builder getDetachTypedLink() {
return detachTypedLink != null ? detachTypedLink.toBuilder() : null;
}
public final void setDetachTypedLink(BatchDetachTypedLinkResponse.BuilderImpl detachTypedLink) {
this.detachTypedLink = detachTypedLink != null ? detachTypedLink.build() : null;
}
@Override
public final Builder detachTypedLink(BatchDetachTypedLinkResponse detachTypedLink) {
this.detachTypedLink = detachTypedLink;
return this;
}
public final BatchUpdateLinkAttributesResponse.Builder getUpdateLinkAttributes() {
return updateLinkAttributes != null ? updateLinkAttributes.toBuilder() : null;
}
public final void setUpdateLinkAttributes(BatchUpdateLinkAttributesResponse.BuilderImpl updateLinkAttributes) {
this.updateLinkAttributes = updateLinkAttributes != null ? updateLinkAttributes.build() : null;
}
@Override
public final Builder updateLinkAttributes(BatchUpdateLinkAttributesResponse updateLinkAttributes) {
this.updateLinkAttributes = updateLinkAttributes;
return this;
}
@Override
public BatchWriteOperationResponse build() {
return new BatchWriteOperationResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
@Override
public Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
}
}