io.stigg.api.operations.CancelSubscriptionMutation 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.CancelSubscriptionMutation_ResponseAdapter;
import io.stigg.api.operations.adapter.CancelSubscriptionMutation_VariablesAdapter;
import io.stigg.api.operations.fragment.SlimSubscriptionFragment;
import io.stigg.api.operations.selections.CancelSubscriptionMutationSelections;
import io.stigg.api.operations.type.SubscriptionCancellationInput;
import java.io.IOException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
public class CancelSubscriptionMutation implements Mutation {
public static final String OPERATION_ID = "5b371c012f2113ce6531136c4da1cb6c8e91b677219206bcedbe89465ff13240";
/**
* The minimized GraphQL document being sent to the server to save a few bytes.
* The un-minimized version is:
*
* mutation CancelSubscription($input: SubscriptionCancellationInput!) {
* cancelSubscription(input: $input) {
* __typename
* ...SlimSubscriptionFragment
* }
* }
*
* fragment SubscriptionInvoiceFragment on SubscriptionInvoice {
* billingId
* status
* createdAt
* updatedAt
* errorMessage
* requiresAction
* paymentSecret
* paymentUrl
* pdfUrl
* billingReason
* currency
* subTotal
* subTotalExcludingTax
* total
* totalExcludingTax
* tax
* amountDue
* }
*
* fragment CustomerResourceFragment on CustomerResource {
* resourceId
* }
*
* fragment PriceTierFragment on PriceTier {
* upTo
* unitPrice {
* amount
* currency
* }
* flatPrice {
* amount
* currency
* }
* }
*
* fragment PriceFragment on Price {
* billingModel
* billingPeriod
* billingCadence
* billingId
* minUnitQuantity
* maxUnitQuantity
* billingCountryCode
* price {
* amount
* currency
* }
* tiersMode
* tiers {
* __typename
* ...PriceTierFragment
* }
* feature {
* refId
* featureUnits
* featureUnitsPlural
* displayName
* description
* }
* blockSize
* }
*
* fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
* subTotal {
* amount
* currency
* }
* total {
* amount
* currency
* }
* }
*
* fragment SlimSubscriptionFragment on CustomerSubscription {
* id
* subscriptionId
* refId
* status
* additionalMetaData
* billingId
* billingLinkUrl
* effectiveEndDate
* currentBillingPeriodEnd
* pricingType
* latestInvoice {
* __typename
* ...SubscriptionInvoiceFragment
* }
* paymentCollection
* billingSyncError
* resource {
* __typename
* ...CustomerResourceFragment
* }
* experimentInfo {
* name
* id
* groupType
* groupName
* }
* prices {
* usageLimit
* price {
* __typename
* ...PriceFragment
* }
* }
* totalPrice {
* __typename
* ...TotalPriceFragment
* }
* plan {
* id
* refId
* }
* addons {
* quantity
* addon {
* id
* refId
* }
* }
* customer {
* id
* refId
* }
* }
*/
public static final String OPERATION_DOCUMENT = "mutation CancelSubscription($input: SubscriptionCancellationInput!) { cancelSubscription(input: $input) { __typename ...SlimSubscriptionFragment } } fragment SubscriptionInvoiceFragment on SubscriptionInvoice { billingId status createdAt updatedAt errorMessage requiresAction paymentSecret paymentUrl pdfUrl billingReason currency subTotal subTotalExcludingTax total totalExcludingTax tax amountDue } fragment CustomerResourceFragment on CustomerResource { resourceId } fragment PriceTierFragment on PriceTier { upTo unitPrice { amount currency } flatPrice { amount currency } } fragment PriceFragment on Price { billingModel billingPeriod billingCadence billingId minUnitQuantity maxUnitQuantity billingCountryCode price { amount currency } tiersMode tiers { __typename ...PriceTierFragment } feature { refId featureUnits featureUnitsPlural displayName description } blockSize } fragment TotalPriceFragment on CustomerSubscriptionTotalPrice { subTotal { amount currency } total { amount currency } } fragment SlimSubscriptionFragment on CustomerSubscription { id subscriptionId refId status additionalMetaData billingId billingLinkUrl effectiveEndDate currentBillingPeriodEnd pricingType latestInvoice { __typename ...SubscriptionInvoiceFragment } paymentCollection billingSyncError resource { __typename ...CustomerResourceFragment } experimentInfo { name id groupType groupName } prices { usageLimit price { __typename ...PriceFragment } } totalPrice { __typename ...TotalPriceFragment } plan { id refId } addons { quantity addon { id refId } } customer { id refId } }";
public static final String OPERATION_NAME = "CancelSubscription";
public final SubscriptionCancellationInput input;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public CancelSubscriptionMutation(SubscriptionCancellationInput input) {
this.input = input;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CancelSubscriptionMutation) {
CancelSubscriptionMutation that = (CancelSubscriptionMutation) 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 = "CancelSubscriptionMutation{"
+ "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 {
CancelSubscriptionMutation_VariablesAdapter.INSTANCE.toJson(writer, customScalarAdapters, this);
}
@Override
public Adapter adapter() {
return new ObjectAdapter(CancelSubscriptionMutation_ResponseAdapter.Data.INSTANCE, false);
}
@Override
public CompiledField rootField() {
return new CompiledField.Builder(
"data",
io.stigg.api.operations.type.Mutation.type
)
.selections(CancelSubscriptionMutationSelections.__root)
.build();
}
public static final class Builder {
private SubscriptionCancellationInput input;
Builder() {
}
public Builder input(SubscriptionCancellationInput input) {
this.input = input;
return this;
}
public CancelSubscriptionMutation build() {
return new CancelSubscriptionMutation(input);
}
}
public static class Data implements Mutation.Data {
public CancelSubscription cancelSubscription;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public Data(CancelSubscription cancelSubscription) {
this.cancelSubscription = cancelSubscription;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.cancelSubscription == null) ? (that.cancelSubscription == null) : this.cancelSubscription.equals(that.cancelSubscription));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (cancelSubscription == null) ? 0 : cancelSubscription.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "cancelSubscription=" + cancelSubscription
+ "}";
}
return $toString;
}
}
public static class CancelSubscription {
public String __typename;
/**
* Synthetic field for 'SlimSubscriptionFragment'
*/
public SlimSubscriptionFragment slimSubscriptionFragment;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public CancelSubscription(String __typename,
SlimSubscriptionFragment slimSubscriptionFragment) {
this.__typename = __typename;
this.slimSubscriptionFragment = slimSubscriptionFragment;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CancelSubscription) {
CancelSubscription that = (CancelSubscription) o;
return ((this.__typename == null) ? (that.__typename == null) : this.__typename.equals(that.__typename))
&&((this.slimSubscriptionFragment == null) ? (that.slimSubscriptionFragment == null) : this.slimSubscriptionFragment.equals(that.slimSubscriptionFragment));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (__typename == null) ? 0 : __typename.hashCode();
__h *= 1000003;
__h ^= (slimSubscriptionFragment == null) ? 0 : slimSubscriptionFragment.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "CancelSubscription{"
+ "__typename=" + __typename + ", "
+ "slimSubscriptionFragment=" + slimSubscriptionFragment
+ "}";
}
return $toString;
}
}
}