package com.amplifyframework.api.graphql.model;

import com.amplifyframework.api.aws.AppSyncGraphQLRequestFactory;
import com.amplifyframework.api.graphql.GraphQLRequest;
import com.amplifyframework.api.graphql.SubscriptionType;
import com.amplifyframework.core.model.Model;
import com.amplifyframework.core.model.ModelPath;
import dn.l;
import kotlin.Metadata;
import kotlin.jvm.internal.t;

@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0004\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J.\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u00062\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\b2\u0006\u0010\t\u001a\u00020\nH\u0007JX\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u0006\"\u000e\b\u0001\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u00050\f2\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\b2\u0006\u0010\t\u001a\u00020\n2\u0018\u0010\r\u001a\u0014\u0012\u0004\u0012\u0002H\u000b\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u000f0\u000eH\u0007J&\u0010\u0011\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u00062\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\bH\u0007JP\u0010\u0011\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u0006\"\u000e\b\u0001\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u00050\f2\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\b2\u0018\u0010\r\u001a\u0014\u0012\u0004\u0012\u0002H\u000b\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u000f0\u000eH\u0007J&\u0010\u0012\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u00062\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\bH\u0007JP\u0010\u0012\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u0006\"\u000e\b\u0001\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u00050\f2\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\b2\u0018\u0010\r\u001a\u0014\u0012\u0004\u0012\u0002H\u000b\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u000f0\u000eH\u0007J&\u0010\u0013\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u00062\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\bH\u0007JP\u0010\u0013\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\b\b\u0000\u0010\u0005*\u00020\u0006\"\u000e\b\u0001\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u00050\f2\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00050\b2\u0018\u0010\r\u001a\u0014\u0012\u0004\u0012\u0002H\u000b\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u000f0\u000eH\u0007¨\u0006\u0014"}, d2 = {"Lcom/amplifyframework/api/graphql/model/ModelSubscription;", "", "()V", "of", "Lcom/amplifyframework/api/graphql/GraphQLRequest;", "M", "Lcom/amplifyframework/core/model/Model;", "modelType", "Ljava/lang/Class;", "type", "Lcom/amplifyframework/api/graphql/SubscriptionType;", "P", "Lcom/amplifyframework/core/model/ModelPath;", "includes", "Lkotlin/Function1;", "", "Lcom/amplifyframework/core/model/PropertyContainerPath;", "onCreate", "onDelete", "onUpdate", "aws-api_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes4.dex */
public final class ModelSubscription {
    public static final ModelSubscription INSTANCE = new ModelSubscription();

    private ModelSubscription() {
    }

    public static final <M extends Model> GraphQLRequest<M> of(Class<M> modelType, SubscriptionType type) {
        t.g(modelType, "modelType");
        t.g(type, "type");
        return AppSyncGraphQLRequestFactory.buildSubscription(modelType, type);
    }

    public static final <M extends Model> GraphQLRequest<M> onCreate(Class<M> modelType) {
        t.g(modelType, "modelType");
        return of(modelType, SubscriptionType.ON_CREATE);
    }

    public static final <M extends Model> GraphQLRequest<M> onDelete(Class<M> modelType) {
        t.g(modelType, "modelType");
        return of(modelType, SubscriptionType.ON_DELETE);
    }

    public static final <M extends Model> GraphQLRequest<M> onUpdate(Class<M> modelType) {
        t.g(modelType, "modelType");
        return of(modelType, SubscriptionType.ON_UPDATE);
    }

    public static final <M extends Model, P extends ModelPath<M>> GraphQLRequest<M> of(Class<M> modelType, SubscriptionType type, l includes) {
        t.g(modelType, "modelType");
        t.g(type, "type");
        t.g(includes, "includes");
        return AppSyncGraphQLRequestFactory.buildSubscription(modelType, type, includes);
    }

    public static final <M extends Model, P extends ModelPath<M>> GraphQLRequest<M> onCreate(Class<M> modelType, l includes) {
        t.g(modelType, "modelType");
        t.g(includes, "includes");
        return of(modelType, SubscriptionType.ON_CREATE, includes);
    }

    public static final <M extends Model, P extends ModelPath<M>> GraphQLRequest<M> onDelete(Class<M> modelType, l includes) {
        t.g(modelType, "modelType");
        t.g(includes, "includes");
        return of(modelType, SubscriptionType.ON_DELETE, includes);
    }

    public static final <M extends Model, P extends ModelPath<M>> GraphQLRequest<M> onUpdate(Class<M> modelType, l includes) {
        t.g(modelType, "modelType");
        t.g(includes, "includes");
        return of(modelType, SubscriptionType.ON_UPDATE, includes);
    }
}
