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

com.stytch.java.consumer.models.m2mclients.M2MClients.kt Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
package com.stytch.java.consumer.models.m2mclients

// !!!
// WARNING: This file is autogenerated
// Only modify code within MANUAL() sections
// or your changes may be overwritten later!
// !!!

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import com.stytch.java.consumer.models.m2m.M2MClient
import com.stytch.java.consumer.models.m2m.M2MClientWithClientSecret
import com.stytch.java.consumer.models.m2m.M2MSearchQuery
import com.stytch.java.consumer.models.m2m.ResultsMetadata

@JsonClass(generateAdapter = false)
public enum class UpdateRequestStatus {
    @Json(name = "active")
    ACTIVE,

    @Json(name = "inactive")
    INACTIVE,
}

/**
* Request type for `Clients.create`.
*/
@JsonClass(generateAdapter = true)
public data class CreateRequest
    @JvmOverloads
    constructor(
        /**
         * An array of scopes assigned to the client.
         */
        @Json(name = "scopes")
        val scopes: List,
        /**
         * If provided, the ID of the client to create. If not provided, Stytch will generate this value for you. The `client_id`
         * must be unique within your project.
         */
        @Json(name = "client_id")
        val clientId: String? = null,
        /**
         * If provided, the stored secret of the client to create. If not provided, Stytch will generate this value for you. If
         * provided, the `client_secret` must be at least 8 characters long and pass entropy requirements.
         */
        @Json(name = "client_secret")
        val clientSecret: String? = null,
        /**
         * A human-readable name for the client.
         */
        @Json(name = "client_name")
        val clientName: String? = null,
        /**
         * A human-readable description for the client.
         */
        @Json(name = "client_description")
        val clientDescription: String? = null,
        /**
         * The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the
         * [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
         */
        @Json(name = "trusted_metadata")
        val trustedMetadata: Map? = emptyMap(),
    )

/**
* Response type for `Clients.create`.
*/
@JsonClass(generateAdapter = true)
public data class CreateResponse
    @JvmOverloads
    constructor(
        /**
         * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
         * may ask for this value to help identify a specific API call when helping you debug an issue.
         */
        @Json(name = "request_id")
        val requestId: String,
        /**
         * The M2M Client created by this API call.
         */
        @Json(name = "m2m_client")
        val m2mClient: M2MClientWithClientSecret,
        /**
         * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
         * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
         */
        @Json(name = "status_code")
        val statusCode: Int,
    )

/**
* Request type for `Clients.delete`.
*/
@JsonClass(generateAdapter = true)
public data class DeleteRequest
    @JvmOverloads
    constructor(
        /**
         * The ID of the client.
         */
        @Json(name = "client_id")
        val clientId: String,
    )

/**
* Response type for `Clients.delete`.
*/
@JsonClass(generateAdapter = true)
public data class DeleteResponse
    @JvmOverloads
    constructor(
        /**
         * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
         * may ask for this value to help identify a specific API call when helping you debug an issue.
         */
        @Json(name = "request_id")
        val requestId: String,
        /**
         * The ID of the client.
         */
        @Json(name = "client_id")
        val clientId: String,
        /**
         * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
         * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
         */
        @Json(name = "status_code")
        val statusCode: Int,
    )

/**
* Request type for `Clients.get`.
*/
@JsonClass(generateAdapter = true)
public data class GetRequest
    @JvmOverloads
    constructor(
        /**
         * The ID of the client.
         */
        @Json(name = "client_id")
        val clientId: String,
    )

/**
* Response type for `Clients.get`.
*/
@JsonClass(generateAdapter = true)
public data class GetResponse
    @JvmOverloads
    constructor(
        /**
         * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
         * may ask for this value to help identify a specific API call when helping you debug an issue.
         */
        @Json(name = "request_id")
        val requestId: String,
        /**
         * The M2M Client affected by this operation.
         */
        @Json(name = "m2m_client")
        val m2mClient: M2MClient,
        /**
         * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
         * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
         */
        @Json(name = "status_code")
        val statusCode: Int,
    )

/**
* Request type for `Clients.search`.
*/
@JsonClass(generateAdapter = true)
public data class SearchRequest
    @JvmOverloads
    constructor(
        /**
         * The `cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your
         * query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a
         * response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the
         * `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until
         * the `next_cursor` in the response is null.
         */
        @Json(name = "cursor")
        val cursor: String? = null,
        /**
         * The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by
         * a single search request. If the total size of your result set is greater than one page size, you must paginate the
         * response. See the `cursor` field.
         */
        @Json(name = "limit")
        val limit: Long? = null,
        /**
         * The optional query object contains the operator, i.e. `AND` or `OR`, and the operands that will filter your results.
         * Only an operator is required. If you include no operands, no filtering will be applied. If you include no query object,
         * it will return all results with no filtering applied.
         */
        @Json(name = "query")
        val query: M2MSearchQuery? = null,
    )

/**
* Response type for `Clients.search`.
*/
@JsonClass(generateAdapter = true)
public data class SearchResponse
    @JvmOverloads
    constructor(
        /**
         * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
         * may ask for this value to help identify a specific API call when helping you debug an issue.
         */
        @Json(name = "request_id")
        val requestId: String,
        /**
         * An array of M2M Clients that match your search query.
         */
        @Json(name = "m2m_clients")
        val m2mClients: List,
        /**
         * The search `results_metadata` object contains metadata relevant to your specific query like total and `next_cursor`.
         */
        @Json(name = "results_metadata")
        val resultsMetadata: ResultsMetadata,
        /**
         * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
         * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
         */
        @Json(name = "status_code")
        val statusCode: Int,
    )

/**
* Request type for `Clients.update`.
*/
@JsonClass(generateAdapter = true)
public data class UpdateRequest
    @JvmOverloads
    constructor(
        /**
         * The ID of the client.
         */
        @Json(name = "client_id")
        val clientId: String,
        /**
         * A human-readable name for the client.
         */
        @Json(name = "client_name")
        val clientName: String? = null,
        /**
         * A human-readable description for the client.
         */
        @Json(name = "client_description")
        val clientDescription: String? = null,
        /**
         * The status of the client - either `active` or `inactive`.
         */
        @Json(name = "status")
        val status: UpdateRequestStatus? = null,
        /**
         * An array of scopes assigned to the client.
         */
        @Json(name = "scopes")
        val scopes: List? = emptyList(),
        /**
         * The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the
         * [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
         */
        @Json(name = "trusted_metadata")
        val trustedMetadata: Map? = emptyMap(),
    )

/**
* Response type for `Clients.update`.
*/
@JsonClass(generateAdapter = true)
public data class UpdateResponse
    @JvmOverloads
    constructor(
        /**
         * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
         * may ask for this value to help identify a specific API call when helping you debug an issue.
         */
        @Json(name = "request_id")
        val requestId: String,
        /**
         * The M2M Client affected by this operation.
         */
        @Json(name = "m2m_client")
        val m2mClient: M2MClient,
        /**
         * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
         * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
         */
        @Json(name = "status_code")
        val statusCode: Int,
    )




© 2015 - 2024 Weber Informatics LLC | Privacy Policy