io.stigg.api.operations.GrantPromotionalEntitlementsMutation Maven / Gradle / Ivy
//
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL version '3.8.2'.
//
package io.stigg.api.operations;
import com.apollographql.apollo3.api.Adapter;
import com.apollographql.apollo3.api.CompiledField;
import com.apollographql.apollo3.api.CustomScalarAdapters;
import com.apollographql.apollo3.api.Mutation;
import com.apollographql.apollo3.api.ObjectAdapter;
import com.apollographql.apollo3.api.json.JsonWriter;
import io.stigg.api.operations.adapter.GrantPromotionalEntitlementsMutation_ResponseAdapter;
import io.stigg.api.operations.adapter.GrantPromotionalEntitlementsMutation_VariablesAdapter;
import io.stigg.api.operations.fragment.PromotionalEntitlementFragment;
import io.stigg.api.operations.selections.GrantPromotionalEntitlementsMutationSelections;
import io.stigg.api.operations.type.GrantPromotionalEntitlementsInput;
import java.io.IOException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.List;
public class GrantPromotionalEntitlementsMutation implements Mutation {
public static final String OPERATION_ID = "273776066335c2d0338e013055c2252070a7cf6b43c8d1d26ec993ccd69538ba";
/**
* The minimized GraphQL document being sent to the server to save a few bytes.
* The un-minimized version is:
*
* mutation GrantPromotionalEntitlements($input: GrantPromotionalEntitlementsInput!) {
* grantPromotionalEntitlements(input: $input) {
* __typename
* ...PromotionalEntitlementFragment
* }
* }
*
* fragment PromotionalEntitlementFragment on PromotionalEntitlement {
* status
* usageLimit
* featureId
* hasUnlimitedUsage
* hasSoftLimit
* resetPeriod
* endDate
* isVisible
* feature {
* featureType
* meterType
* featureUnits
* featureUnitsPlural
* displayName
* description
* refId
* additionalMetaData
* }
* }
*/
public static final String OPERATION_DOCUMENT = "mutation GrantPromotionalEntitlements($input: GrantPromotionalEntitlementsInput!) { grantPromotionalEntitlements(input: $input) { __typename ...PromotionalEntitlementFragment } } fragment PromotionalEntitlementFragment on PromotionalEntitlement { status usageLimit featureId hasUnlimitedUsage hasSoftLimit resetPeriod endDate isVisible feature { featureType meterType featureUnits featureUnitsPlural displayName description refId additionalMetaData } }";
public static final String OPERATION_NAME = "GrantPromotionalEntitlements";
public final GrantPromotionalEntitlementsInput input;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public GrantPromotionalEntitlementsMutation(GrantPromotionalEntitlementsInput input) {
this.input = input;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof GrantPromotionalEntitlementsMutation) {
GrantPromotionalEntitlementsMutation that = (GrantPromotionalEntitlementsMutation) o;
return ((this.input == null) ? (that.input == null) : this.input.equals(that.input));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (input == null) ? 0 : input.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "GrantPromotionalEntitlementsMutation{"
+ "input=" + input
+ "}";
}
return $toString;
}
public static Builder builder() {
return new Builder();
}
@Override
public String id() {
return OPERATION_ID;
}
@Override
public String document() {
return OPERATION_DOCUMENT;
}
@Override
public String name() {
return OPERATION_NAME;
}
@Override
public void serializeVariables(JsonWriter writer, CustomScalarAdapters customScalarAdapters)
throws IOException {
GrantPromotionalEntitlementsMutation_VariablesAdapter.INSTANCE.toJson(writer, customScalarAdapters, this);
}
@Override
public Adapter adapter() {
return new ObjectAdapter(GrantPromotionalEntitlementsMutation_ResponseAdapter.Data.INSTANCE, false);
}
@Override
public CompiledField rootField() {
return new CompiledField.Builder(
"data",
io.stigg.api.operations.type.Mutation.type
)
.selections(GrantPromotionalEntitlementsMutationSelections.__root)
.build();
}
public static final class Builder {
private GrantPromotionalEntitlementsInput input;
Builder() {
}
public Builder input(GrantPromotionalEntitlementsInput input) {
this.input = input;
return this;
}
public GrantPromotionalEntitlementsMutation build() {
return new GrantPromotionalEntitlementsMutation(input);
}
}
public static class Data implements Mutation.Data {
public List grantPromotionalEntitlements;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public Data(List grantPromotionalEntitlements) {
this.grantPromotionalEntitlements = grantPromotionalEntitlements;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.grantPromotionalEntitlements == null) ? (that.grantPromotionalEntitlements == null) : this.grantPromotionalEntitlements.equals(that.grantPromotionalEntitlements));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (grantPromotionalEntitlements == null) ? 0 : grantPromotionalEntitlements.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "grantPromotionalEntitlements=" + grantPromotionalEntitlements
+ "}";
}
return $toString;
}
}
public static class GrantPromotionalEntitlement {
public String __typename;
/**
* Synthetic field for 'PromotionalEntitlementFragment'
*/
public PromotionalEntitlementFragment promotionalEntitlementFragment;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public GrantPromotionalEntitlement(String __typename,
PromotionalEntitlementFragment promotionalEntitlementFragment) {
this.__typename = __typename;
this.promotionalEntitlementFragment = promotionalEntitlementFragment;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof GrantPromotionalEntitlement) {
GrantPromotionalEntitlement that = (GrantPromotionalEntitlement) o;
return ((this.__typename == null) ? (that.__typename == null) : this.__typename.equals(that.__typename))
&&((this.promotionalEntitlementFragment == null) ? (that.promotionalEntitlementFragment == null) : this.promotionalEntitlementFragment.equals(that.promotionalEntitlementFragment));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (__typename == null) ? 0 : __typename.hashCode();
__h *= 1000003;
__h ^= (promotionalEntitlementFragment == null) ? 0 : promotionalEntitlementFragment.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "GrantPromotionalEntitlement{"
+ "__typename=" + __typename + ", "
+ "promotionalEntitlementFragment=" + promotionalEntitlementFragment
+ "}";
}
return $toString;
}
}
}