All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.client.JsonEndpoint Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.client;

import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.models.Base;

/**
 * Internal class.
 * @param  resource type
 */
public final class JsonEndpoint extends Base {
    private final TypeReference typeReference;
    private final String endpoint;

    private JsonEndpoint(final TypeReference typeReference, final String endpoint) {
        this.typeReference = typeReference;
        this.endpoint = endpoint;
    }

    public TypeReference typeReference() {
        return typeReference;
    }

    public String endpoint() {
        return endpoint;
    }

    public static  JsonEndpoint of(final TypeReference typeReference, final String endpoint) {
        return new JsonEndpoint<>(typeReference, endpoint);
    }

    public  JsonEndpoint withTypeReference(final TypeReference newTypeReference) {
        return of(newTypeReference, endpoint);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy