com.expediagroup.streamplatform.streamregistry.state.graphql.ZoneStatusMutation Maven / Gradle / Ivy
The newest version!
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL plugin from the GraphQL queries it found.
// It should not be modified by hand.
//
package com.expediagroup.streamplatform.streamregistry.state.graphql;
import com.apollographql.apollo.api.Mutation;
import com.apollographql.apollo.api.Operation;
import com.apollographql.apollo.api.OperationName;
import com.apollographql.apollo.api.Response;
import com.apollographql.apollo.api.ResponseField;
import com.apollographql.apollo.api.ScalarTypeAdapters;
import com.apollographql.apollo.api.internal.InputFieldMarshaller;
import com.apollographql.apollo.api.internal.InputFieldWriter;
import com.apollographql.apollo.api.internal.Mutator;
import com.apollographql.apollo.api.internal.OperationRequestBodyComposer;
import com.apollographql.apollo.api.internal.QueryDocumentMinifier;
import com.apollographql.apollo.api.internal.ResponseFieldMapper;
import com.apollographql.apollo.api.internal.ResponseFieldMarshaller;
import com.apollographql.apollo.api.internal.ResponseReader;
import com.apollographql.apollo.api.internal.ResponseWriter;
import com.apollographql.apollo.api.internal.SimpleOperationResponseParser;
import com.apollographql.apollo.api.internal.UnmodifiableMapBuilder;
import com.apollographql.apollo.api.internal.Utils;
import com.expediagroup.streamplatform.streamregistry.state.graphql.type.StatusInput;
import com.expediagroup.streamplatform.streamregistry.state.graphql.type.ZoneKeyInput;
import java.io.IOException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
public final class ZoneStatusMutation implements Mutation, ZoneStatusMutation.Variables> {
public static final String OPERATION_ID = "cfbef0598a30c4ebd192049863f01f6cb48869c31f7ef1ad53900ad06883be90";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"mutation ZoneStatus($key: ZoneKeyInput!, $status: StatusInput!) {\n"
+ " zone {\n"
+ " __typename\n"
+ " updateStatus(key: $key, status: $status) {\n"
+ " __typename\n"
+ " }\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "ZoneStatus";
}
};
private final ZoneStatusMutation.Variables variables;
public ZoneStatusMutation(@NotNull ZoneKeyInput key, @NotNull StatusInput status) {
Utils.checkNotNull(key, "key == null");
Utils.checkNotNull(status, "status == null");
variables = new ZoneStatusMutation.Variables(key, status);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public Optional wrapData(ZoneStatusMutation.Data data) {
return Optional.ofNullable(data);
}
@Override
public ZoneStatusMutation.Variables variables() {
return variables;
}
@Override
public ResponseFieldMapper responseFieldMapper() {
return new Data.Mapper();
}
public static Builder builder() {
return new Builder();
}
@Override
public OperationName name() {
return OPERATION_NAME;
}
@Override
@NotNull
public Response> parse(@NotNull final BufferedSource source,
@NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
return SimpleOperationResponseParser.parse(source, this, scalarTypeAdapters);
}
@Override
@NotNull
public Response> parse(@NotNull final ByteString byteString,
@NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
return parse(new Buffer().write(byteString), scalarTypeAdapters);
}
@Override
@NotNull
public Response> parse(@NotNull final BufferedSource source)
throws IOException {
return parse(source, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public Response> parse(@NotNull final ByteString byteString)
throws IOException {
return parse(byteString, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public ByteString composeRequestBody(@NotNull final ScalarTypeAdapters scalarTypeAdapters) {
return OperationRequestBodyComposer.compose(this, false, true, scalarTypeAdapters);
}
@NotNull
@Override
public ByteString composeRequestBody() {
return OperationRequestBodyComposer.compose(this, false, true, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public ByteString composeRequestBody(final boolean autoPersistQueries,
final boolean withQueryDocument, @NotNull final ScalarTypeAdapters scalarTypeAdapters) {
return OperationRequestBodyComposer.compose(this, autoPersistQueries, withQueryDocument, scalarTypeAdapters);
}
public static final class Builder {
private @NotNull ZoneKeyInput key;
private @NotNull StatusInput status;
Builder() {
}
public Builder key(@NotNull ZoneKeyInput key) {
this.key = key;
return this;
}
public Builder status(@NotNull StatusInput status) {
this.status = status;
return this;
}
public ZoneStatusMutation build() {
Utils.checkNotNull(key, "key == null");
Utils.checkNotNull(status, "status == null");
return new ZoneStatusMutation(key, status);
}
}
public static final class Variables extends Operation.Variables {
private final @NotNull ZoneKeyInput key;
private final @NotNull StatusInput status;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(@NotNull ZoneKeyInput key, @NotNull StatusInput status) {
this.key = key;
this.status = status;
this.valueMap.put("key", key);
this.valueMap.put("status", status);
}
public @NotNull ZoneKeyInput key() {
return key;
}
public @NotNull StatusInput status() {
return status;
}
@Override
public Map valueMap() {
return Collections.unmodifiableMap(valueMap);
}
@Override
public InputFieldMarshaller marshaller() {
return new InputFieldMarshaller() {
@Override
public void marshal(InputFieldWriter writer) throws IOException {
writer.writeObject("key", key.marshaller());
writer.writeObject("status", status.marshaller());
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("zone", "zone", null, false, Collections.emptyList())
};
final @NotNull Zone zone;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@NotNull Zone zone) {
this.zone = Utils.checkNotNull(zone, "zone == null");
}
public @NotNull Zone getZone() {
return this.zone;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], zone.marshaller());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "zone=" + zone
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return this.zone.equals(that.zone);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= zone.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public Builder toBuilder() {
Builder builder = new Builder();
builder.zone = zone;
return builder;
}
public static Builder builder() {
return new Builder();
}
public static final class Mapper implements ResponseFieldMapper {
final Zone.Mapper zoneFieldMapper = new Zone.Mapper();
@Override
public Data map(ResponseReader reader) {
final Zone zone = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public Zone read(ResponseReader reader) {
return zoneFieldMapper.map(reader);
}
});
return new Data(zone);
}
}
public static final class Builder {
private @NotNull Zone zone;
Builder() {
}
public Builder zone(@NotNull Zone zone) {
this.zone = zone;
return this;
}
public Builder zone(@NotNull Mutator mutator) {
Utils.checkNotNull(mutator, "mutator == null");
Zone.Builder builder = this.zone != null ? this.zone.toBuilder() : Zone.builder();
mutator.accept(builder);
this.zone = builder.build();
return this;
}
public Data build() {
Utils.checkNotNull(zone, "zone == null");
return new Data(zone);
}
}
}
public static class Zone {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("updateStatus", "updateStatus", new UnmodifiableMapBuilder(2)
.put("key", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "key")
.build())
.put("status", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "status")
.build())
.build(), false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull UpdateStatus updateStatus;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Zone(@NotNull String __typename, @NotNull UpdateStatus updateStatus) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.updateStatus = Utils.checkNotNull(updateStatus, "updateStatus == null");
}
public @NotNull String get__typename() {
return this.__typename;
}
public @NotNull UpdateStatus getUpdateStatus() {
return this.updateStatus;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], updateStatus.marshaller());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Zone{"
+ "__typename=" + __typename + ", "
+ "updateStatus=" + updateStatus
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Zone) {
Zone that = (Zone) o;
return this.__typename.equals(that.__typename)
&& this.updateStatus.equals(that.updateStatus);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= updateStatus.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public Builder toBuilder() {
Builder builder = new Builder();
builder.__typename = __typename;
builder.updateStatus = updateStatus;
return builder;
}
public static Builder builder() {
return new Builder();
}
public static final class Mapper implements ResponseFieldMapper {
final UpdateStatus.Mapper updateStatusFieldMapper = new UpdateStatus.Mapper();
@Override
public Zone map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final UpdateStatus updateStatus = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public UpdateStatus read(ResponseReader reader) {
return updateStatusFieldMapper.map(reader);
}
});
return new Zone(__typename, updateStatus);
}
}
public static final class Builder {
private @NotNull String __typename;
private @NotNull UpdateStatus updateStatus;
Builder() {
}
public Builder __typename(@NotNull String __typename) {
this.__typename = __typename;
return this;
}
public Builder updateStatus(@NotNull UpdateStatus updateStatus) {
this.updateStatus = updateStatus;
return this;
}
public Builder updateStatus(@NotNull Mutator mutator) {
Utils.checkNotNull(mutator, "mutator == null");
UpdateStatus.Builder builder = this.updateStatus != null ? this.updateStatus.toBuilder() : UpdateStatus.builder();
mutator.accept(builder);
this.updateStatus = builder.build();
return this;
}
public Zone build() {
Utils.checkNotNull(__typename, "__typename == null");
Utils.checkNotNull(updateStatus, "updateStatus == null");
return new Zone(__typename, updateStatus);
}
}
}
public static class UpdateStatus {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList())
};
final @NotNull String __typename;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public UpdateStatus(@NotNull String __typename) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
}
public @NotNull String get__typename() {
return this.__typename;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "UpdateStatus{"
+ "__typename=" + __typename
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UpdateStatus) {
UpdateStatus that = (UpdateStatus) o;
return this.__typename.equals(that.__typename);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public Builder toBuilder() {
Builder builder = new Builder();
builder.__typename = __typename;
return builder;
}
public static Builder builder() {
return new Builder();
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public UpdateStatus map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
return new UpdateStatus(__typename);
}
}
public static final class Builder {
private @NotNull String __typename;
Builder() {
}
public Builder __typename(@NotNull String __typename) {
this.__typename = __typename;
return this;
}
public UpdateStatus build() {
Utils.checkNotNull(__typename, "__typename == null");
return new UpdateStatus(__typename);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy