-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e97b3a
commit bcb0e16
Showing
145 changed files
with
12,964 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
configured_endpoints: 89 | ||
configured_endpoints: 102 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
...in-core/src/main/kotlin/com/lithic/api/models/AccountCreditConfigurationRetrieveParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
|
||
package com.lithic.api.models | ||
|
||
import com.lithic.api.core.NoAutoDetect | ||
import com.lithic.api.core.toUnmodifiable | ||
import com.lithic.api.models.* | ||
import java.util.Objects | ||
|
||
class AccountCreditConfigurationRetrieveParams | ||
constructor( | ||
private val accountToken: String, | ||
private val additionalQueryParams: Map<String, List<String>>, | ||
private val additionalHeaders: Map<String, List<String>>, | ||
) { | ||
|
||
fun accountToken(): String = accountToken | ||
|
||
internal fun getQueryParams(): Map<String, List<String>> = additionalQueryParams | ||
|
||
internal fun getHeaders(): Map<String, List<String>> = additionalHeaders | ||
|
||
fun getPathParam(index: Int): String { | ||
return when (index) { | ||
0 -> accountToken | ||
else -> "" | ||
} | ||
} | ||
|
||
fun _additionalQueryParams(): Map<String, List<String>> = additionalQueryParams | ||
|
||
fun _additionalHeaders(): Map<String, List<String>> = additionalHeaders | ||
|
||
override fun equals(other: Any?): Boolean { | ||
if (this === other) { | ||
return true | ||
} | ||
|
||
return other is AccountCreditConfigurationRetrieveParams && | ||
this.accountToken == other.accountToken && | ||
this.additionalQueryParams == other.additionalQueryParams && | ||
this.additionalHeaders == other.additionalHeaders | ||
} | ||
|
||
override fun hashCode(): Int { | ||
return Objects.hash( | ||
accountToken, | ||
additionalQueryParams, | ||
additionalHeaders, | ||
) | ||
} | ||
|
||
override fun toString() = | ||
"AccountCreditConfigurationRetrieveParams{accountToken=$accountToken, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" | ||
|
||
fun toBuilder() = Builder().from(this) | ||
|
||
companion object { | ||
|
||
fun builder() = Builder() | ||
} | ||
|
||
@NoAutoDetect | ||
class Builder { | ||
|
||
private var accountToken: String? = null | ||
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf() | ||
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf() | ||
|
||
internal fun from( | ||
accountCreditConfigurationRetrieveParams: AccountCreditConfigurationRetrieveParams | ||
) = apply { | ||
this.accountToken = accountCreditConfigurationRetrieveParams.accountToken | ||
additionalQueryParams(accountCreditConfigurationRetrieveParams.additionalQueryParams) | ||
additionalHeaders(accountCreditConfigurationRetrieveParams.additionalHeaders) | ||
} | ||
|
||
fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } | ||
|
||
fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply { | ||
this.additionalQueryParams.clear() | ||
putAllQueryParams(additionalQueryParams) | ||
} | ||
|
||
fun putQueryParam(name: String, value: String) = apply { | ||
this.additionalQueryParams.getOrPut(name) { mutableListOf() }.add(value) | ||
} | ||
|
||
fun putQueryParams(name: String, values: Iterable<String>) = apply { | ||
this.additionalQueryParams.getOrPut(name) { mutableListOf() }.addAll(values) | ||
} | ||
|
||
fun putAllQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply { | ||
additionalQueryParams.forEach(this::putQueryParams) | ||
} | ||
|
||
fun removeQueryParam(name: String) = apply { | ||
this.additionalQueryParams.put(name, mutableListOf()) | ||
} | ||
|
||
fun additionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply { | ||
this.additionalHeaders.clear() | ||
putAllHeaders(additionalHeaders) | ||
} | ||
|
||
fun putHeader(name: String, value: String) = apply { | ||
this.additionalHeaders.getOrPut(name) { mutableListOf() }.add(value) | ||
} | ||
|
||
fun putHeaders(name: String, values: Iterable<String>) = apply { | ||
this.additionalHeaders.getOrPut(name) { mutableListOf() }.addAll(values) | ||
} | ||
|
||
fun putAllHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply { | ||
additionalHeaders.forEach(this::putHeaders) | ||
} | ||
|
||
fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } | ||
|
||
fun build(): AccountCreditConfigurationRetrieveParams = | ||
AccountCreditConfigurationRetrieveParams( | ||
checkNotNull(accountToken) { "`accountToken` is required but was not set" }, | ||
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), | ||
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), | ||
) | ||
} | ||
} |
Oops, something went wrong.