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.
io.stigg.api.operations.fragment.PaywallFragmentImpl_ResponseAdapter 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.fragment;
import com.apollographql.apollo3.api.Adapter;
import com.apollographql.apollo3.api.Adapters;
import com.apollographql.apollo3.api.Assertions;
import com.apollographql.apollo3.api.CustomScalarAdapters;
import com.apollographql.apollo3.api.ListAdapter;
import com.apollographql.apollo3.api.NullableAdapter;
import com.apollographql.apollo3.api.ObjectAdapter;
import com.apollographql.apollo3.api.json.JsonReader;
import com.apollographql.apollo3.api.json.JsonWriter;
import java.io.IOException;
import java.lang.Override;
import java.lang.String;
import java.util.Arrays;
import java.util.List;
public class PaywallFragmentImpl_ResponseAdapter {
public enum PaywallFragment implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("plans", "currency", "configuration", "customer", "activeSubscriptions", "resource", "paywallCalculatedPricePoints");
@Override
public io.stigg.api.operations.fragment.PaywallFragment fromJson(JsonReader reader,
CustomScalarAdapters customScalarAdapters) throws IOException {
List _plans = null;
io.stigg.api.operations.fragment.PaywallFragment.Currency _currency = null;
io.stigg.api.operations.fragment.PaywallFragment.Configuration _configuration = null;
io.stigg.api.operations.fragment.PaywallFragment.Customer _customer = null;
List _activeSubscriptions = null;
io.stigg.api.operations.fragment.PaywallFragment.Resource _resource = null;
List _paywallCalculatedPricePoints = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: _plans = new ListAdapter<>(new ObjectAdapter(Plan.INSTANCE, true)).fromJson(reader, customScalarAdapters); break;
case 1: _currency = new ObjectAdapter(Currency.INSTANCE, true).fromJson(reader, customScalarAdapters); break;
case 2: _configuration = new NullableAdapter<>(new ObjectAdapter(Configuration.INSTANCE, true)).fromJson(reader, customScalarAdapters); break;
case 3: _customer = new NullableAdapter<>(new ObjectAdapter(Customer.INSTANCE, true)).fromJson(reader, customScalarAdapters); break;
case 4: _activeSubscriptions = new NullableAdapter<>(new ListAdapter<>(new ObjectAdapter(ActiveSubscription.INSTANCE, true))).fromJson(reader, customScalarAdapters); break;
case 5: _resource = new NullableAdapter<>(new ObjectAdapter(Resource.INSTANCE, true)).fromJson(reader, customScalarAdapters); break;
case 6: _paywallCalculatedPricePoints = new NullableAdapter<>(new ListAdapter<>(new ObjectAdapter(PaywallCalculatedPricePoint.INSTANCE, true))).fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
Assertions.checkFieldNotMissing(_plans, "plans");
Assertions.checkFieldNotMissing(_currency, "currency");
return new io.stigg.api.operations.fragment.PaywallFragment(
_plans,
_currency,
_configuration,
_customer,
_activeSubscriptions,
_resource,
_paywallCalculatedPricePoints
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment value) throws IOException {
writer.name("plans");
new ListAdapter<>(new ObjectAdapter(Plan.INSTANCE, true)).toJson(writer, customScalarAdapters, value.plans);
writer.name("currency");
new ObjectAdapter(Currency.INSTANCE, true).toJson(writer, customScalarAdapters, value.currency);
writer.name("configuration");
new NullableAdapter<>(new ObjectAdapter(Configuration.INSTANCE, true)).toJson(writer, customScalarAdapters, value.configuration);
writer.name("customer");
new NullableAdapter<>(new ObjectAdapter(Customer.INSTANCE, true)).toJson(writer, customScalarAdapters, value.customer);
writer.name("activeSubscriptions");
new NullableAdapter<>(new ListAdapter<>(new ObjectAdapter(ActiveSubscription.INSTANCE, true))).toJson(writer, customScalarAdapters, value.activeSubscriptions);
writer.name("resource");
new NullableAdapter<>(new ObjectAdapter(Resource.INSTANCE, true)).toJson(writer, customScalarAdapters, value.resource);
writer.name("paywallCalculatedPricePoints");
new NullableAdapter<>(new ListAdapter<>(new ObjectAdapter(PaywallCalculatedPricePoint.INSTANCE, true))).toJson(writer, customScalarAdapters, value.paywallCalculatedPricePoints);
}
}
public enum Plan implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.Plan fromJson(JsonReader reader,
CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
PlanFragment _planFragment = io.stigg.api.operations.fragment.PlanFragmentImpl_ResponseAdapter.PlanFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.Plan(
__typename,
_planFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.Plan value) throws IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.PlanFragmentImpl_ResponseAdapter.PlanFragment.INSTANCE.toJson(writer, customScalarAdapters, value.planFragment);
}
}
public enum Currency implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.Currency fromJson(JsonReader reader,
CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
PaywallCurrencyFragment _paywallCurrencyFragment = io.stigg.api.operations.fragment.PaywallCurrencyFragmentImpl_ResponseAdapter.PaywallCurrencyFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.Currency(
__typename,
_paywallCurrencyFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.Currency value) throws IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.PaywallCurrencyFragmentImpl_ResponseAdapter.PaywallCurrencyFragment.INSTANCE.toJson(writer, customScalarAdapters, value.paywallCurrencyFragment);
}
}
public enum Configuration implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.Configuration fromJson(
JsonReader reader, CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
PaywallConfigurationFragment _paywallConfigurationFragment = io.stigg.api.operations.fragment.PaywallConfigurationFragmentImpl_ResponseAdapter.PaywallConfigurationFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.Configuration(
__typename,
_paywallConfigurationFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.Configuration value) throws IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.PaywallConfigurationFragmentImpl_ResponseAdapter.PaywallConfigurationFragment.INSTANCE.toJson(writer, customScalarAdapters, value.paywallConfigurationFragment);
}
}
public enum Customer implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.Customer fromJson(JsonReader reader,
CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
CustomerFragment _customerFragment = io.stigg.api.operations.fragment.CustomerFragmentImpl_ResponseAdapter.CustomerFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.Customer(
__typename,
_customerFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.Customer value) throws IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.CustomerFragmentImpl_ResponseAdapter.CustomerFragment.INSTANCE.toJson(writer, customScalarAdapters, value.customerFragment);
}
}
public enum ActiveSubscription implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.ActiveSubscription fromJson(
JsonReader reader, CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
SubscriptionFragment _subscriptionFragment = io.stigg.api.operations.fragment.SubscriptionFragmentImpl_ResponseAdapter.SubscriptionFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.ActiveSubscription(
__typename,
_subscriptionFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.ActiveSubscription value) throws
IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.SubscriptionFragmentImpl_ResponseAdapter.SubscriptionFragment.INSTANCE.toJson(writer, customScalarAdapters, value.subscriptionFragment);
}
}
public enum Resource implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.Resource fromJson(JsonReader reader,
CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
CustomerResourceFragment _customerResourceFragment = io.stigg.api.operations.fragment.CustomerResourceFragmentImpl_ResponseAdapter.CustomerResourceFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.Resource(
__typename,
_customerResourceFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.Resource value) throws IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.CustomerResourceFragmentImpl_ResponseAdapter.CustomerResourceFragment.INSTANCE.toJson(writer, customScalarAdapters, value.customerResourceFragment);
}
}
public enum PaywallCalculatedPricePoint implements Adapter {
INSTANCE;
private static final List RESPONSE_NAMES = Arrays.asList("__typename");
@Override
public io.stigg.api.operations.fragment.PaywallFragment.PaywallCalculatedPricePoint fromJson(
JsonReader reader, CustomScalarAdapters customScalarAdapters) throws IOException {
String __typename = null;
loop:
while(true) {
switch (reader.selectName(RESPONSE_NAMES)) {
case 0: __typename = Adapters.StringAdapter.fromJson(reader, customScalarAdapters); break;
default: break loop;
}
}
reader.rewind();
PaywallCalculatedPricePointsFragment _paywallCalculatedPricePointsFragment = io.stigg.api.operations.fragment.PaywallCalculatedPricePointsFragmentImpl_ResponseAdapter.PaywallCalculatedPricePointsFragment.INSTANCE.fromJson(reader, customScalarAdapters);
Assertions.checkFieldNotMissing(__typename, "__typename");
return new io.stigg.api.operations.fragment.PaywallFragment.PaywallCalculatedPricePoint(
__typename,
_paywallCalculatedPricePointsFragment
);
}
@Override
public void toJson(JsonWriter writer, CustomScalarAdapters customScalarAdapters,
io.stigg.api.operations.fragment.PaywallFragment.PaywallCalculatedPricePoint value) throws
IOException {
writer.name("__typename");
Adapters.StringAdapter.toJson(writer, customScalarAdapters, value.__typename);
io.stigg.api.operations.fragment.PaywallCalculatedPricePointsFragmentImpl_ResponseAdapter.PaywallCalculatedPricePointsFragment.INSTANCE.toJson(writer, customScalarAdapters, value.paywallCalculatedPricePointsFragment);
}
}
}