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

com.cohere.api.resources.finetuning.requests.FinetuningListFinetunedModelsRequest Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
/**
 * This file was auto-generated by Fern from our API Definition.
 */
package com.cohere.api.resources.finetuning.requests;

import com.cohere.api.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonDeserialize(builder = FinetuningListFinetunedModelsRequest.Builder.class)
public final class FinetuningListFinetunedModelsRequest {
    private final Optional pageSize;

    private final Optional pageToken;

    private final Optional orderBy;

    private final Map additionalProperties;

    private FinetuningListFinetunedModelsRequest(
            Optional pageSize,
            Optional pageToken,
            Optional orderBy,
            Map additionalProperties) {
        this.pageSize = pageSize;
        this.pageToken = pageToken;
        this.orderBy = orderBy;
        this.additionalProperties = additionalProperties;
    }

    /**
     * @return Maximum number of results to be returned by the server. If 0, defaults to 50.
     */
    @JsonProperty("page_size")
    public Optional getPageSize() {
        return pageSize;
    }

    /**
     * @return Request a specific page of the list results.
     */
    @JsonProperty("page_token")
    public Optional getPageToken() {
        return pageToken;
    }

    /**
     * @return Comma separated list of fields. For example: "created_at,name". The default
     * sorting order is ascending. To specify descending order for a field, append
     * " desc" to the field name. For example: "created_at desc,name".
     * 

Supported sorting fields:

*
    *
  • created_at (default)
  • *
*/ @JsonProperty("order_by") public Optional getOrderBy() { return orderBy; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof FinetuningListFinetunedModelsRequest && equalTo((FinetuningListFinetunedModelsRequest) other); } @JsonAnyGetter public Map getAdditionalProperties() { return this.additionalProperties; } private boolean equalTo(FinetuningListFinetunedModelsRequest other) { return pageSize.equals(other.pageSize) && pageToken.equals(other.pageToken) && orderBy.equals(other.orderBy); } @java.lang.Override public int hashCode() { return Objects.hash(this.pageSize, this.pageToken, this.orderBy); } @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } public static Builder builder() { return new Builder(); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { private Optional pageSize = Optional.empty(); private Optional pageToken = Optional.empty(); private Optional orderBy = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} public Builder from(FinetuningListFinetunedModelsRequest other) { pageSize(other.getPageSize()); pageToken(other.getPageToken()); orderBy(other.getOrderBy()); return this; } @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; return this; } public Builder pageSize(Integer pageSize) { this.pageSize = Optional.of(pageSize); return this; } @JsonSetter(value = "page_token", nulls = Nulls.SKIP) public Builder pageToken(Optional pageToken) { this.pageToken = pageToken; return this; } public Builder pageToken(String pageToken) { this.pageToken = Optional.of(pageToken); return this; } @JsonSetter(value = "order_by", nulls = Nulls.SKIP) public Builder orderBy(Optional orderBy) { this.orderBy = orderBy; return this; } public Builder orderBy(String orderBy) { this.orderBy = Optional.of(orderBy); return this; } public FinetuningListFinetunedModelsRequest build() { return new FinetuningListFinetunedModelsRequest(pageSize, pageToken, orderBy, additionalProperties); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy