From 2fc53014ee56237cd1968299568b2ac596ea6247 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:42:11 +0000 Subject: [PATCH 1/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8f07be2..bc6f91e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 8 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-64dee37a21a809941330b048765b0eff4805b5c6959bb17f141da70e61ecb88d.yml -openapi_spec_hash: d0fc0e51311de52c3aaa5c411db0f92b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-b4634ce20698b51bceba24fe685badcd7e1aeb470d3562df8ad2240e1f771a83.yml +openapi_spec_hash: 505b9bfbc33f2330a2adea1a6f534e5f config_hash: 4e76a07aea49753a61313dcd8c10fb0f From cabff0c6d0df85a304f196860d7dd55ebcc6a796 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:44:13 +0000 Subject: [PATCH 2/6] feat(api): manual updates --- .stats.yml | 4 +- .../models/brand/BrandRetrieveByNameParams.kt | 735 ++ .../brand/BrandRetrieveByNameResponse.kt | 6387 ++++++++++++++++ .../brand/BrandRetrieveByTickerParams.kt | 1306 ++++ .../brand/BrandRetrieveByTickerResponse.kt | 6388 +++++++++++++++++ .../api/services/async/BrandServiceAsync.kt | 64 + .../services/async/BrandServiceAsyncImpl.kt | 78 + .../api/services/blocking/BrandService.kt | 64 + .../api/services/blocking/BrandServiceImpl.kt | 72 + .../brand/BrandRetrieveByNameParamsTest.kt | 52 + .../brand/BrandRetrieveByNameResponseTest.kt | 358 + .../brand/BrandRetrieveByTickerParamsTest.kt | 55 + .../BrandRetrieveByTickerResponseTest.kt | 362 + .../services/async/BrandServiceAsyncTest.kt | 51 + .../api/services/blocking/BrandServiceTest.kt | 49 + 15 files changed, 16023 insertions(+), 2 deletions(-) create mode 100644 brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParams.kt create mode 100644 brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponse.kt create mode 100644 brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParams.kt create mode 100644 brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponse.kt create mode 100644 brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParamsTest.kt create mode 100644 brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponseTest.kt create mode 100644 brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParamsTest.kt create mode 100644 brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponseTest.kt diff --git a/.stats.yml b/.stats.yml index bc6f91e..1264983 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 8 +configured_endpoints: 10 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-b4634ce20698b51bceba24fe685badcd7e1aeb470d3562df8ad2240e1f771a83.yml openapi_spec_hash: 505b9bfbc33f2330a2adea1a6f534e5f -config_hash: 4e76a07aea49753a61313dcd8c10fb0f +config_hash: a1303564edd6276a63d584a02b2238b2 diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParams.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParams.kt new file mode 100644 index 0000000..825b31d --- /dev/null +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParams.kt @@ -0,0 +1,735 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.Enum +import com.branddev.api.core.JsonField +import com.branddev.api.core.Params +import com.branddev.api.core.checkRequired +import com.branddev.api.core.http.Headers +import com.branddev.api.core.http.QueryParams +import com.branddev.api.errors.BrandDevInvalidDataException +import com.fasterxml.jackson.annotation.JsonCreator +import java.util.Objects +import java.util.Optional +import kotlin.jvm.optionals.getOrNull + +/** + * Retrieve brand information using a company name. This endpoint searches for the company by name + * and returns its brand data. + */ +class BrandRetrieveByNameParams +private constructor( + private val name: String, + private val forceLanguage: ForceLanguage?, + private val maxSpeed: Boolean?, + private val timeoutMs: Long?, + private val additionalHeaders: Headers, + private val additionalQueryParams: QueryParams, +) : Params { + + /** + * Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporation'). Must be + * 3-30 characters. + */ + fun name(): String = name + + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(): Optional = Optional.ofNullable(forceLanguage) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API will + * skip time-consuming operations for faster response at the cost of less comprehensive data. + */ + fun maxSpeed(): Optional = Optional.ofNullable(maxSpeed) + + /** + * Optional timeout in milliseconds for the request. If the request takes longer than this + * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 + * minutes). + */ + fun timeoutMs(): Optional = Optional.ofNullable(timeoutMs) + + /** Additional headers to send with the request. */ + fun _additionalHeaders(): Headers = additionalHeaders + + /** Additional query param to send with the request. */ + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [BrandRetrieveByNameParams]. + * + * The following fields are required: + * ```java + * .name() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [BrandRetrieveByNameParams]. */ + class Builder internal constructor() { + + private var name: String? = null + private var forceLanguage: ForceLanguage? = null + private var maxSpeed: Boolean? = null + private var timeoutMs: Long? = null + private var additionalHeaders: Headers.Builder = Headers.builder() + private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() + + @JvmSynthetic + internal fun from(brandRetrieveByNameParams: BrandRetrieveByNameParams) = apply { + name = brandRetrieveByNameParams.name + forceLanguage = brandRetrieveByNameParams.forceLanguage + maxSpeed = brandRetrieveByNameParams.maxSpeed + timeoutMs = brandRetrieveByNameParams.timeoutMs + additionalHeaders = brandRetrieveByNameParams.additionalHeaders.toBuilder() + additionalQueryParams = brandRetrieveByNameParams.additionalQueryParams.toBuilder() + } + + /** + * Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporation'). + * Must be 3-30 characters. + */ + fun name(name: String) = apply { this.name = name } + + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(forceLanguage: ForceLanguage?) = apply { + this.forceLanguage = forceLanguage + } + + /** Alias for calling [Builder.forceLanguage] with `forceLanguage.orElse(null)`. */ + fun forceLanguage(forceLanguage: Optional) = + forceLanguage(forceLanguage.getOrNull()) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API + * will skip time-consuming operations for faster response at the cost of less comprehensive + * data. + */ + fun maxSpeed(maxSpeed: Boolean?) = apply { this.maxSpeed = maxSpeed } + + /** + * Alias for [Builder.maxSpeed]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun maxSpeed(maxSpeed: Boolean) = maxSpeed(maxSpeed as Boolean?) + + /** Alias for calling [Builder.maxSpeed] with `maxSpeed.orElse(null)`. */ + fun maxSpeed(maxSpeed: Optional) = maxSpeed(maxSpeed.getOrNull()) + + /** + * Optional timeout in milliseconds for the request. If the request takes longer than this + * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 + * minutes). + */ + fun timeoutMs(timeoutMs: Long?) = apply { this.timeoutMs = timeoutMs } + + /** + * Alias for [Builder.timeoutMs]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun timeoutMs(timeoutMs: Long) = timeoutMs(timeoutMs as Long?) + + /** Alias for calling [Builder.timeoutMs] with `timeoutMs.orElse(null)`. */ + fun timeoutMs(timeoutMs: Optional) = timeoutMs(timeoutMs.getOrNull()) + + fun additionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.clear() + putAllAdditionalHeaders(additionalHeaders) + } + + fun additionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.clear() + putAllAdditionalHeaders(additionalHeaders) + } + + fun putAdditionalHeader(name: String, value: String) = apply { + additionalHeaders.put(name, value) + } + + fun putAdditionalHeaders(name: String, values: Iterable) = apply { + additionalHeaders.put(name, values) + } + + fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.putAll(additionalHeaders) + } + + fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.putAll(additionalHeaders) + } + + fun replaceAdditionalHeaders(name: String, value: String) = apply { + additionalHeaders.replace(name, value) + } + + fun replaceAdditionalHeaders(name: String, values: Iterable) = apply { + additionalHeaders.replace(name, values) + } + + fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.replaceAll(additionalHeaders) + } + + fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.replaceAll(additionalHeaders) + } + + fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) } + + fun removeAllAdditionalHeaders(names: Set) = apply { + additionalHeaders.removeAll(names) + } + + fun additionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.clear() + putAllAdditionalQueryParams(additionalQueryParams) + } + + fun additionalQueryParams(additionalQueryParams: Map>) = apply { + this.additionalQueryParams.clear() + putAllAdditionalQueryParams(additionalQueryParams) + } + + fun putAdditionalQueryParam(key: String, value: String) = apply { + additionalQueryParams.put(key, value) + } + + fun putAdditionalQueryParams(key: String, values: Iterable) = apply { + additionalQueryParams.put(key, values) + } + + fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.putAll(additionalQueryParams) + } + + fun putAllAdditionalQueryParams(additionalQueryParams: Map>) = + apply { + this.additionalQueryParams.putAll(additionalQueryParams) + } + + fun replaceAdditionalQueryParams(key: String, value: String) = apply { + additionalQueryParams.replace(key, value) + } + + fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply { + additionalQueryParams.replace(key, values) + } + + fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.replaceAll(additionalQueryParams) + } + + fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) = + apply { + this.additionalQueryParams.replaceAll(additionalQueryParams) + } + + fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) } + + fun removeAllAdditionalQueryParams(keys: Set) = apply { + additionalQueryParams.removeAll(keys) + } + + /** + * Returns an immutable instance of [BrandRetrieveByNameParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .name() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): BrandRetrieveByNameParams = + BrandRetrieveByNameParams( + checkRequired("name", name), + forceLanguage, + maxSpeed, + timeoutMs, + additionalHeaders.build(), + additionalQueryParams.build(), + ) + } + + override fun _headers(): Headers = additionalHeaders + + override fun _queryParams(): QueryParams = + QueryParams.builder() + .apply { + put("name", name) + forceLanguage?.let { put("force_language", it.toString()) } + maxSpeed?.let { put("maxSpeed", it.toString()) } + timeoutMs?.let { put("timeoutMS", it.toString()) } + putAll(additionalQueryParams) + } + .build() + + /** Optional parameter to force the language of the retrieved brand data. */ + class ForceLanguage @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ALBANIAN = of("albanian") + + @JvmField val ARABIC = of("arabic") + + @JvmField val AZERI = of("azeri") + + @JvmField val BENGALI = of("bengali") + + @JvmField val BULGARIAN = of("bulgarian") + + @JvmField val CEBUANO = of("cebuano") + + @JvmField val CROATIAN = of("croatian") + + @JvmField val CZECH = of("czech") + + @JvmField val DANISH = of("danish") + + @JvmField val DUTCH = of("dutch") + + @JvmField val ENGLISH = of("english") + + @JvmField val ESTONIAN = of("estonian") + + @JvmField val FARSI = of("farsi") + + @JvmField val FINNISH = of("finnish") + + @JvmField val FRENCH = of("french") + + @JvmField val GERMAN = of("german") + + @JvmField val HAUSA = of("hausa") + + @JvmField val HAWAIIAN = of("hawaiian") + + @JvmField val HINDI = of("hindi") + + @JvmField val HUNGARIAN = of("hungarian") + + @JvmField val ICELANDIC = of("icelandic") + + @JvmField val INDONESIAN = of("indonesian") + + @JvmField val ITALIAN = of("italian") + + @JvmField val KAZAKH = of("kazakh") + + @JvmField val KYRGYZ = of("kyrgyz") + + @JvmField val LATIN = of("latin") + + @JvmField val LATVIAN = of("latvian") + + @JvmField val LITHUANIAN = of("lithuanian") + + @JvmField val MACEDONIAN = of("macedonian") + + @JvmField val MONGOLIAN = of("mongolian") + + @JvmField val NEPALI = of("nepali") + + @JvmField val NORWEGIAN = of("norwegian") + + @JvmField val PASHTO = of("pashto") + + @JvmField val PIDGIN = of("pidgin") + + @JvmField val POLISH = of("polish") + + @JvmField val PORTUGUESE = of("portuguese") + + @JvmField val ROMANIAN = of("romanian") + + @JvmField val RUSSIAN = of("russian") + + @JvmField val SERBIAN = of("serbian") + + @JvmField val SLOVAK = of("slovak") + + @JvmField val SLOVENE = of("slovene") + + @JvmField val SOMALI = of("somali") + + @JvmField val SPANISH = of("spanish") + + @JvmField val SWAHILI = of("swahili") + + @JvmField val SWEDISH = of("swedish") + + @JvmField val TAGALOG = of("tagalog") + + @JvmField val TURKISH = of("turkish") + + @JvmField val UKRAINIAN = of("ukrainian") + + @JvmField val URDU = of("urdu") + + @JvmField val UZBEK = of("uzbek") + + @JvmField val VIETNAMESE = of("vietnamese") + + @JvmField val WELSH = of("welsh") + + @JvmStatic fun of(value: String) = ForceLanguage(JsonField.of(value)) + } + + /** An enum containing [ForceLanguage]'s known values. */ + enum class Known { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + } + + /** + * An enum containing [ForceLanguage]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [ForceLanguage] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + /** + * An enum member indicating that [ForceLanguage] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ALBANIAN -> Value.ALBANIAN + ARABIC -> Value.ARABIC + AZERI -> Value.AZERI + BENGALI -> Value.BENGALI + BULGARIAN -> Value.BULGARIAN + CEBUANO -> Value.CEBUANO + CROATIAN -> Value.CROATIAN + CZECH -> Value.CZECH + DANISH -> Value.DANISH + DUTCH -> Value.DUTCH + ENGLISH -> Value.ENGLISH + ESTONIAN -> Value.ESTONIAN + FARSI -> Value.FARSI + FINNISH -> Value.FINNISH + FRENCH -> Value.FRENCH + GERMAN -> Value.GERMAN + HAUSA -> Value.HAUSA + HAWAIIAN -> Value.HAWAIIAN + HINDI -> Value.HINDI + HUNGARIAN -> Value.HUNGARIAN + ICELANDIC -> Value.ICELANDIC + INDONESIAN -> Value.INDONESIAN + ITALIAN -> Value.ITALIAN + KAZAKH -> Value.KAZAKH + KYRGYZ -> Value.KYRGYZ + LATIN -> Value.LATIN + LATVIAN -> Value.LATVIAN + LITHUANIAN -> Value.LITHUANIAN + MACEDONIAN -> Value.MACEDONIAN + MONGOLIAN -> Value.MONGOLIAN + NEPALI -> Value.NEPALI + NORWEGIAN -> Value.NORWEGIAN + PASHTO -> Value.PASHTO + PIDGIN -> Value.PIDGIN + POLISH -> Value.POLISH + PORTUGUESE -> Value.PORTUGUESE + ROMANIAN -> Value.ROMANIAN + RUSSIAN -> Value.RUSSIAN + SERBIAN -> Value.SERBIAN + SLOVAK -> Value.SLOVAK + SLOVENE -> Value.SLOVENE + SOMALI -> Value.SOMALI + SPANISH -> Value.SPANISH + SWAHILI -> Value.SWAHILI + SWEDISH -> Value.SWEDISH + TAGALOG -> Value.TAGALOG + TURKISH -> Value.TURKISH + UKRAINIAN -> Value.UKRAINIAN + URDU -> Value.URDU + UZBEK -> Value.UZBEK + VIETNAMESE -> Value.VIETNAMESE + WELSH -> Value.WELSH + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + ALBANIAN -> Known.ALBANIAN + ARABIC -> Known.ARABIC + AZERI -> Known.AZERI + BENGALI -> Known.BENGALI + BULGARIAN -> Known.BULGARIAN + CEBUANO -> Known.CEBUANO + CROATIAN -> Known.CROATIAN + CZECH -> Known.CZECH + DANISH -> Known.DANISH + DUTCH -> Known.DUTCH + ENGLISH -> Known.ENGLISH + ESTONIAN -> Known.ESTONIAN + FARSI -> Known.FARSI + FINNISH -> Known.FINNISH + FRENCH -> Known.FRENCH + GERMAN -> Known.GERMAN + HAUSA -> Known.HAUSA + HAWAIIAN -> Known.HAWAIIAN + HINDI -> Known.HINDI + HUNGARIAN -> Known.HUNGARIAN + ICELANDIC -> Known.ICELANDIC + INDONESIAN -> Known.INDONESIAN + ITALIAN -> Known.ITALIAN + KAZAKH -> Known.KAZAKH + KYRGYZ -> Known.KYRGYZ + LATIN -> Known.LATIN + LATVIAN -> Known.LATVIAN + LITHUANIAN -> Known.LITHUANIAN + MACEDONIAN -> Known.MACEDONIAN + MONGOLIAN -> Known.MONGOLIAN + NEPALI -> Known.NEPALI + NORWEGIAN -> Known.NORWEGIAN + PASHTO -> Known.PASHTO + PIDGIN -> Known.PIDGIN + POLISH -> Known.POLISH + PORTUGUESE -> Known.PORTUGUESE + ROMANIAN -> Known.ROMANIAN + RUSSIAN -> Known.RUSSIAN + SERBIAN -> Known.SERBIAN + SLOVAK -> Known.SLOVAK + SLOVENE -> Known.SLOVENE + SOMALI -> Known.SOMALI + SPANISH -> Known.SPANISH + SWAHILI -> Known.SWAHILI + SWEDISH -> Known.SWEDISH + TAGALOG -> Known.TAGALOG + TURKISH -> Known.TURKISH + UKRAINIAN -> Known.UKRAINIAN + URDU -> Known.URDU + UZBEK -> Known.UZBEK + VIETNAMESE -> Known.VIETNAMESE + WELSH -> Known.WELSH + else -> throw BrandDevInvalidDataException("Unknown ForceLanguage: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): ForceLanguage = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is ForceLanguage && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is BrandRetrieveByNameParams && + name == other.name && + forceLanguage == other.forceLanguage && + maxSpeed == other.maxSpeed && + timeoutMs == other.timeoutMs && + additionalHeaders == other.additionalHeaders && + additionalQueryParams == other.additionalQueryParams + } + + override fun hashCode(): Int = + Objects.hash( + name, + forceLanguage, + maxSpeed, + timeoutMs, + additionalHeaders, + additionalQueryParams, + ) + + override fun toString() = + "BrandRetrieveByNameParams{name=$name, forceLanguage=$forceLanguage, maxSpeed=$maxSpeed, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" +} diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponse.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponse.kt new file mode 100644 index 0000000..db50cd9 --- /dev/null +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponse.kt @@ -0,0 +1,6387 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.Enum +import com.branddev.api.core.ExcludeMissing +import com.branddev.api.core.JsonField +import com.branddev.api.core.JsonMissing +import com.branddev.api.core.JsonValue +import com.branddev.api.core.checkKnown +import com.branddev.api.core.checkRequired +import com.branddev.api.core.toImmutable +import com.branddev.api.errors.BrandDevInvalidDataException +import com.fasterxml.jackson.annotation.JsonAnyGetter +import com.fasterxml.jackson.annotation.JsonAnySetter +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import java.util.Collections +import java.util.Objects +import java.util.Optional +import kotlin.jvm.optionals.getOrNull + +class BrandRetrieveByNameResponse +@JsonCreator(mode = JsonCreator.Mode.DISABLED) +private constructor( + private val brand: JsonField, + private val code: JsonField, + private val status: JsonField, + private val additionalProperties: MutableMap, +) { + + @JsonCreator + private constructor( + @JsonProperty("brand") @ExcludeMissing brand: JsonField = JsonMissing.of(), + @JsonProperty("code") @ExcludeMissing code: JsonField = JsonMissing.of(), + @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), + ) : this(brand, code, status, mutableMapOf()) + + /** + * Detailed brand information + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun brand(): Optional = brand.getOptional("brand") + + /** + * HTTP status code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun code(): Optional = code.getOptional("code") + + /** + * Status of the response, e.g., 'ok' + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun status(): Optional = status.getOptional("status") + + /** + * Returns the raw JSON value of [brand]. + * + * Unlike [brand], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("brand") @ExcludeMissing fun _brand(): JsonField = brand + + /** + * Returns the raw JSON value of [code]. + * + * Unlike [code], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("code") @ExcludeMissing fun _code(): JsonField = code + + /** + * Returns the raw JSON value of [status]. + * + * Unlike [status], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [BrandRetrieveByNameResponse]. + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [BrandRetrieveByNameResponse]. */ + class Builder internal constructor() { + + private var brand: JsonField = JsonMissing.of() + private var code: JsonField = JsonMissing.of() + private var status: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(brandRetrieveByNameResponse: BrandRetrieveByNameResponse) = apply { + brand = brandRetrieveByNameResponse.brand + code = brandRetrieveByNameResponse.code + status = brandRetrieveByNameResponse.status + additionalProperties = brandRetrieveByNameResponse.additionalProperties.toMutableMap() + } + + /** Detailed brand information */ + fun brand(brand: Brand) = brand(JsonField.of(brand)) + + /** + * Sets [Builder.brand] to an arbitrary JSON value. + * + * You should usually call [Builder.brand] with a well-typed [Brand] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun brand(brand: JsonField) = apply { this.brand = brand } + + /** HTTP status code */ + fun code(code: Long) = code(JsonField.of(code)) + + /** + * Sets [Builder.code] to an arbitrary JSON value. + * + * You should usually call [Builder.code] with a well-typed [Long] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun code(code: JsonField) = apply { this.code = code } + + /** Status of the response, e.g., 'ok' */ + fun status(status: String) = status(JsonField.of(status)) + + /** + * Sets [Builder.status] to an arbitrary JSON value. + * + * You should usually call [Builder.status] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun status(status: JsonField) = apply { this.status = status } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [BrandRetrieveByNameResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): BrandRetrieveByNameResponse = + BrandRetrieveByNameResponse(brand, code, status, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): BrandRetrieveByNameResponse = apply { + if (validated) { + return@apply + } + + brand().ifPresent { it.validate() } + code() + status() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (brand.asKnown().getOrNull()?.validity() ?: 0) + + (if (code.asKnown().isPresent) 1 else 0) + + (if (status.asKnown().isPresent) 1 else 0) + + /** Detailed brand information */ + class Brand + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val address: JsonField
, + private val backdrops: JsonField>, + private val colors: JsonField>, + private val description: JsonField, + private val domain: JsonField, + private val email: JsonField, + private val industries: JsonField, + private val isNsfw: JsonField, + private val links: JsonField, + private val logos: JsonField>, + private val phone: JsonField, + private val slogan: JsonField, + private val socials: JsonField>, + private val stock: JsonField, + private val title: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("address") @ExcludeMissing address: JsonField
= JsonMissing.of(), + @JsonProperty("backdrops") + @ExcludeMissing + backdrops: JsonField> = JsonMissing.of(), + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("description") + @ExcludeMissing + description: JsonField = JsonMissing.of(), + @JsonProperty("domain") @ExcludeMissing domain: JsonField = JsonMissing.of(), + @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(), + @JsonProperty("industries") + @ExcludeMissing + industries: JsonField = JsonMissing.of(), + @JsonProperty("is_nsfw") @ExcludeMissing isNsfw: JsonField = JsonMissing.of(), + @JsonProperty("links") @ExcludeMissing links: JsonField = JsonMissing.of(), + @JsonProperty("logos") @ExcludeMissing logos: JsonField> = JsonMissing.of(), + @JsonProperty("phone") @ExcludeMissing phone: JsonField = JsonMissing.of(), + @JsonProperty("slogan") @ExcludeMissing slogan: JsonField = JsonMissing.of(), + @JsonProperty("socials") + @ExcludeMissing + socials: JsonField> = JsonMissing.of(), + @JsonProperty("stock") @ExcludeMissing stock: JsonField = JsonMissing.of(), + @JsonProperty("title") @ExcludeMissing title: JsonField = JsonMissing.of(), + ) : this( + address, + backdrops, + colors, + description, + domain, + email, + industries, + isNsfw, + links, + logos, + phone, + slogan, + socials, + stock, + title, + mutableMapOf(), + ) + + /** + * Physical address of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun address(): Optional
= address.getOptional("address") + + /** + * An array of backdrop images for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun backdrops(): Optional> = backdrops.getOptional("backdrops") + + /** + * An array of brand colors + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * A brief description of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun description(): Optional = description.getOptional("description") + + /** + * The domain name of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun domain(): Optional = domain.getOptional("domain") + + /** + * Company email address + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun email(): Optional = email.getOptional("email") + + /** + * Industry classification information for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun industries(): Optional = industries.getOptional("industries") + + /** + * Indicates whether the brand content is not safe for work (NSFW) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun isNsfw(): Optional = isNsfw.getOptional("is_nsfw") + + /** + * Important website links for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun links(): Optional = links.getOptional("links") + + /** + * An array of logos associated with the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun logos(): Optional> = logos.getOptional("logos") + + /** + * Company phone number + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun phone(): Optional = phone.getOptional("phone") + + /** + * The brand's slogan + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun slogan(): Optional = slogan.getOptional("slogan") + + /** + * An array of social media links for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun socials(): Optional> = socials.getOptional("socials") + + /** + * Stock market information for this brand (will be null if not a publicly traded company) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun stock(): Optional = stock.getOptional("stock") + + /** + * The title or name of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun title(): Optional = title.getOptional("title") + + /** + * Returns the raw JSON value of [address]. + * + * Unlike [address], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("address") @ExcludeMissing fun _address(): JsonField
= address + + /** + * Returns the raw JSON value of [backdrops]. + * + * Unlike [backdrops], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("backdrops") + @ExcludeMissing + fun _backdrops(): JsonField> = backdrops + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [description]. + * + * Unlike [description], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("description") + @ExcludeMissing + fun _description(): JsonField = description + + /** + * Returns the raw JSON value of [domain]. + * + * Unlike [domain], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("domain") @ExcludeMissing fun _domain(): JsonField = domain + + /** + * Returns the raw JSON value of [email]. + * + * Unlike [email], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email + + /** + * Returns the raw JSON value of [industries]. + * + * Unlike [industries], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("industries") + @ExcludeMissing + fun _industries(): JsonField = industries + + /** + * Returns the raw JSON value of [isNsfw]. + * + * Unlike [isNsfw], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("is_nsfw") @ExcludeMissing fun _isNsfw(): JsonField = isNsfw + + /** + * Returns the raw JSON value of [links]. + * + * Unlike [links], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("links") @ExcludeMissing fun _links(): JsonField = links + + /** + * Returns the raw JSON value of [logos]. + * + * Unlike [logos], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("logos") @ExcludeMissing fun _logos(): JsonField> = logos + + /** + * Returns the raw JSON value of [phone]. + * + * Unlike [phone], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("phone") @ExcludeMissing fun _phone(): JsonField = phone + + /** + * Returns the raw JSON value of [slogan]. + * + * Unlike [slogan], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("slogan") @ExcludeMissing fun _slogan(): JsonField = slogan + + /** + * Returns the raw JSON value of [socials]. + * + * Unlike [socials], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("socials") @ExcludeMissing fun _socials(): JsonField> = socials + + /** + * Returns the raw JSON value of [stock]. + * + * Unlike [stock], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("stock") @ExcludeMissing fun _stock(): JsonField = stock + + /** + * Returns the raw JSON value of [title]. + * + * Unlike [title], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("title") @ExcludeMissing fun _title(): JsonField = title + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Brand]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Brand]. */ + class Builder internal constructor() { + + private var address: JsonField
= JsonMissing.of() + private var backdrops: JsonField>? = null + private var colors: JsonField>? = null + private var description: JsonField = JsonMissing.of() + private var domain: JsonField = JsonMissing.of() + private var email: JsonField = JsonMissing.of() + private var industries: JsonField = JsonMissing.of() + private var isNsfw: JsonField = JsonMissing.of() + private var links: JsonField = JsonMissing.of() + private var logos: JsonField>? = null + private var phone: JsonField = JsonMissing.of() + private var slogan: JsonField = JsonMissing.of() + private var socials: JsonField>? = null + private var stock: JsonField = JsonMissing.of() + private var title: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(brand: Brand) = apply { + address = brand.address + backdrops = brand.backdrops.map { it.toMutableList() } + colors = brand.colors.map { it.toMutableList() } + description = brand.description + domain = brand.domain + email = brand.email + industries = brand.industries + isNsfw = brand.isNsfw + links = brand.links + logos = brand.logos.map { it.toMutableList() } + phone = brand.phone + slogan = brand.slogan + socials = brand.socials.map { it.toMutableList() } + stock = brand.stock + title = brand.title + additionalProperties = brand.additionalProperties.toMutableMap() + } + + /** Physical address of the brand */ + fun address(address: Address) = address(JsonField.of(address)) + + /** + * Sets [Builder.address] to an arbitrary JSON value. + * + * You should usually call [Builder.address] with a well-typed [Address] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun address(address: JsonField
) = apply { this.address = address } + + /** An array of backdrop images for the brand */ + fun backdrops(backdrops: List) = backdrops(JsonField.of(backdrops)) + + /** + * Sets [Builder.backdrops] to an arbitrary JSON value. + * + * You should usually call [Builder.backdrops] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun backdrops(backdrops: JsonField>) = apply { + this.backdrops = backdrops.map { it.toMutableList() } + } + + /** + * Adds a single [Backdrop] to [backdrops]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addBackdrop(backdrop: Backdrop) = apply { + backdrops = + (backdrops ?: JsonField.of(mutableListOf())).also { + checkKnown("backdrops", it).add(backdrop) + } + } + + /** An array of brand colors */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** A brief description of the brand */ + fun description(description: String) = description(JsonField.of(description)) + + /** + * Sets [Builder.description] to an arbitrary JSON value. + * + * You should usually call [Builder.description] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun description(description: JsonField) = apply { + this.description = description + } + + /** The domain name of the brand */ + fun domain(domain: String) = domain(JsonField.of(domain)) + + /** + * Sets [Builder.domain] to an arbitrary JSON value. + * + * You should usually call [Builder.domain] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun domain(domain: JsonField) = apply { this.domain = domain } + + /** Company email address */ + fun email(email: String) = email(JsonField.of(email)) + + /** + * Sets [Builder.email] to an arbitrary JSON value. + * + * You should usually call [Builder.email] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun email(email: JsonField) = apply { this.email = email } + + /** Industry classification information for the brand */ + fun industries(industries: Industries) = industries(JsonField.of(industries)) + + /** + * Sets [Builder.industries] to an arbitrary JSON value. + * + * You should usually call [Builder.industries] with a well-typed [Industries] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun industries(industries: JsonField) = apply { + this.industries = industries + } + + /** Indicates whether the brand content is not safe for work (NSFW) */ + fun isNsfw(isNsfw: Boolean) = isNsfw(JsonField.of(isNsfw)) + + /** + * Sets [Builder.isNsfw] to an arbitrary JSON value. + * + * You should usually call [Builder.isNsfw] with a well-typed [Boolean] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun isNsfw(isNsfw: JsonField) = apply { this.isNsfw = isNsfw } + + /** Important website links for the brand */ + fun links(links: Links) = links(JsonField.of(links)) + + /** + * Sets [Builder.links] to an arbitrary JSON value. + * + * You should usually call [Builder.links] with a well-typed [Links] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun links(links: JsonField) = apply { this.links = links } + + /** An array of logos associated with the brand */ + fun logos(logos: List) = logos(JsonField.of(logos)) + + /** + * Sets [Builder.logos] to an arbitrary JSON value. + * + * You should usually call [Builder.logos] with a well-typed `List` value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun logos(logos: JsonField>) = apply { + this.logos = logos.map { it.toMutableList() } + } + + /** + * Adds a single [Logo] to [logos]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addLogo(logo: Logo) = apply { + logos = + (logos ?: JsonField.of(mutableListOf())).also { + checkKnown("logos", it).add(logo) + } + } + + /** Company phone number */ + fun phone(phone: String) = phone(JsonField.of(phone)) + + /** + * Sets [Builder.phone] to an arbitrary JSON value. + * + * You should usually call [Builder.phone] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun phone(phone: JsonField) = apply { this.phone = phone } + + /** The brand's slogan */ + fun slogan(slogan: String) = slogan(JsonField.of(slogan)) + + /** + * Sets [Builder.slogan] to an arbitrary JSON value. + * + * You should usually call [Builder.slogan] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun slogan(slogan: JsonField) = apply { this.slogan = slogan } + + /** An array of social media links for the brand */ + fun socials(socials: List) = socials(JsonField.of(socials)) + + /** + * Sets [Builder.socials] to an arbitrary JSON value. + * + * You should usually call [Builder.socials] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun socials(socials: JsonField>) = apply { + this.socials = socials.map { it.toMutableList() } + } + + /** + * Adds a single [Social] to [socials]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addSocial(social: Social) = apply { + socials = + (socials ?: JsonField.of(mutableListOf())).also { + checkKnown("socials", it).add(social) + } + } + + /** + * Stock market information for this brand (will be null if not a publicly traded + * company) + */ + fun stock(stock: Stock) = stock(JsonField.of(stock)) + + /** + * Sets [Builder.stock] to an arbitrary JSON value. + * + * You should usually call [Builder.stock] with a well-typed [Stock] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun stock(stock: JsonField) = apply { this.stock = stock } + + /** The title or name of the brand */ + fun title(title: String) = title(JsonField.of(title)) + + /** + * Sets [Builder.title] to an arbitrary JSON value. + * + * You should usually call [Builder.title] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun title(title: JsonField) = apply { this.title = title } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Brand]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Brand = + Brand( + address, + (backdrops ?: JsonMissing.of()).map { it.toImmutable() }, + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + description, + domain, + email, + industries, + isNsfw, + links, + (logos ?: JsonMissing.of()).map { it.toImmutable() }, + phone, + slogan, + (socials ?: JsonMissing.of()).map { it.toImmutable() }, + stock, + title, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Brand = apply { + if (validated) { + return@apply + } + + address().ifPresent { it.validate() } + backdrops().ifPresent { it.forEach { it.validate() } } + colors().ifPresent { it.forEach { it.validate() } } + description() + domain() + email() + industries().ifPresent { it.validate() } + isNsfw() + links().ifPresent { it.validate() } + logos().ifPresent { it.forEach { it.validate() } } + phone() + slogan() + socials().ifPresent { it.forEach { it.validate() } } + stock().ifPresent { it.validate() } + title() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (address.asKnown().getOrNull()?.validity() ?: 0) + + (backdrops.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (description.asKnown().isPresent) 1 else 0) + + (if (domain.asKnown().isPresent) 1 else 0) + + (if (email.asKnown().isPresent) 1 else 0) + + (industries.asKnown().getOrNull()?.validity() ?: 0) + + (if (isNsfw.asKnown().isPresent) 1 else 0) + + (links.asKnown().getOrNull()?.validity() ?: 0) + + (logos.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (phone.asKnown().isPresent) 1 else 0) + + (if (slogan.asKnown().isPresent) 1 else 0) + + (socials.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (stock.asKnown().getOrNull()?.validity() ?: 0) + + (if (title.asKnown().isPresent) 1 else 0) + + /** Physical address of the brand */ + class Address + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val city: JsonField, + private val country: JsonField, + private val countryCode: JsonField, + private val postalCode: JsonField, + private val stateCode: JsonField, + private val stateProvince: JsonField, + private val street: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(), + @JsonProperty("country") + @ExcludeMissing + country: JsonField = JsonMissing.of(), + @JsonProperty("country_code") + @ExcludeMissing + countryCode: JsonField = JsonMissing.of(), + @JsonProperty("postal_code") + @ExcludeMissing + postalCode: JsonField = JsonMissing.of(), + @JsonProperty("state_code") + @ExcludeMissing + stateCode: JsonField = JsonMissing.of(), + @JsonProperty("state_province") + @ExcludeMissing + stateProvince: JsonField = JsonMissing.of(), + @JsonProperty("street") @ExcludeMissing street: JsonField = JsonMissing.of(), + ) : this( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + mutableMapOf(), + ) + + /** + * City name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun city(): Optional = city.getOptional("city") + + /** + * Country name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun country(): Optional = country.getOptional("country") + + /** + * Country code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun countryCode(): Optional = countryCode.getOptional("country_code") + + /** + * Postal or ZIP code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun postalCode(): Optional = postalCode.getOptional("postal_code") + + /** + * State or province code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun stateCode(): Optional = stateCode.getOptional("state_code") + + /** + * State or province name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun stateProvince(): Optional = stateProvince.getOptional("state_province") + + /** + * Street address + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun street(): Optional = street.getOptional("street") + + /** + * Returns the raw JSON value of [city]. + * + * Unlike [city], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city + + /** + * Returns the raw JSON value of [country]. + * + * Unlike [country], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country + + /** + * Returns the raw JSON value of [countryCode]. + * + * Unlike [countryCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("country_code") + @ExcludeMissing + fun _countryCode(): JsonField = countryCode + + /** + * Returns the raw JSON value of [postalCode]. + * + * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("postal_code") + @ExcludeMissing + fun _postalCode(): JsonField = postalCode + + /** + * Returns the raw JSON value of [stateCode]. + * + * Unlike [stateCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("state_code") + @ExcludeMissing + fun _stateCode(): JsonField = stateCode + + /** + * Returns the raw JSON value of [stateProvince]. + * + * Unlike [stateProvince], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("state_province") + @ExcludeMissing + fun _stateProvince(): JsonField = stateProvince + + /** + * Returns the raw JSON value of [street]. + * + * Unlike [street], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("street") @ExcludeMissing fun _street(): JsonField = street + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Address]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Address]. */ + class Builder internal constructor() { + + private var city: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var countryCode: JsonField = JsonMissing.of() + private var postalCode: JsonField = JsonMissing.of() + private var stateCode: JsonField = JsonMissing.of() + private var stateProvince: JsonField = JsonMissing.of() + private var street: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(address: Address) = apply { + city = address.city + country = address.country + countryCode = address.countryCode + postalCode = address.postalCode + stateCode = address.stateCode + stateProvince = address.stateProvince + street = address.street + additionalProperties = address.additionalProperties.toMutableMap() + } + + /** City name */ + fun city(city: String) = city(JsonField.of(city)) + + /** + * Sets [Builder.city] to an arbitrary JSON value. + * + * You should usually call [Builder.city] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun city(city: JsonField) = apply { this.city = city } + + /** Country name */ + fun country(country: String) = country(JsonField.of(country)) + + /** + * Sets [Builder.country] to an arbitrary JSON value. + * + * You should usually call [Builder.country] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun country(country: JsonField) = apply { this.country = country } + + /** Country code */ + fun countryCode(countryCode: String) = countryCode(JsonField.of(countryCode)) + + /** + * Sets [Builder.countryCode] to an arbitrary JSON value. + * + * You should usually call [Builder.countryCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun countryCode(countryCode: JsonField) = apply { + this.countryCode = countryCode + } + + /** Postal or ZIP code */ + fun postalCode(postalCode: String) = postalCode(JsonField.of(postalCode)) + + /** + * Sets [Builder.postalCode] to an arbitrary JSON value. + * + * You should usually call [Builder.postalCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun postalCode(postalCode: JsonField) = apply { + this.postalCode = postalCode + } + + /** State or province code */ + fun stateCode(stateCode: String) = stateCode(JsonField.of(stateCode)) + + /** + * Sets [Builder.stateCode] to an arbitrary JSON value. + * + * You should usually call [Builder.stateCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun stateCode(stateCode: JsonField) = apply { this.stateCode = stateCode } + + /** State or province name */ + fun stateProvince(stateProvince: String) = + stateProvince(JsonField.of(stateProvince)) + + /** + * Sets [Builder.stateProvince] to an arbitrary JSON value. + * + * You should usually call [Builder.stateProvince] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun stateProvince(stateProvince: JsonField) = apply { + this.stateProvince = stateProvince + } + + /** Street address */ + fun street(street: String) = street(JsonField.of(street)) + + /** + * Sets [Builder.street] to an arbitrary JSON value. + * + * You should usually call [Builder.street] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun street(street: JsonField) = apply { this.street = street } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Address]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Address = + Address( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Address = apply { + if (validated) { + return@apply + } + + city() + country() + countryCode() + postalCode() + stateCode() + stateProvince() + street() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (city.asKnown().isPresent) 1 else 0) + + (if (country.asKnown().isPresent) 1 else 0) + + (if (countryCode.asKnown().isPresent) 1 else 0) + + (if (postalCode.asKnown().isPresent) 1 else 0) + + (if (stateCode.asKnown().isPresent) 1 else 0) + + (if (stateProvince.asKnown().isPresent) 1 else 0) + + (if (street.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Address && + city == other.city && + country == other.country && + countryCode == other.countryCode && + postalCode == other.postalCode && + stateCode == other.stateCode && + stateProvince == other.stateProvince && + street == other.street && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Address{city=$city, country=$country, countryCode=$countryCode, postalCode=$postalCode, stateCode=$stateCode, stateProvince=$stateProvince, street=$street, additionalProperties=$additionalProperties}" + } + + class Backdrop + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val colors: JsonField>, + private val resolution: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("resolution") + @ExcludeMissing + resolution: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(colors, resolution, url, mutableMapOf()) + + /** + * Array of colors in the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * Resolution of the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun resolution(): Optional = resolution.getOptional("resolution") + + /** + * URL of the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [resolution]. + * + * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("resolution") + @ExcludeMissing + fun _resolution(): JsonField = resolution + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Backdrop]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Backdrop]. */ + class Builder internal constructor() { + + private var colors: JsonField>? = null + private var resolution: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(backdrop: Backdrop) = apply { + colors = backdrop.colors.map { it.toMutableList() } + resolution = backdrop.resolution + url = backdrop.url + additionalProperties = backdrop.additionalProperties.toMutableMap() + } + + /** Array of colors in the backdrop image */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** Resolution of the backdrop image */ + fun resolution(resolution: Resolution) = resolution(JsonField.of(resolution)) + + /** + * Sets [Builder.resolution] to an arbitrary JSON value. + * + * You should usually call [Builder.resolution] with a well-typed [Resolution] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun resolution(resolution: JsonField) = apply { + this.resolution = resolution + } + + /** URL of the backdrop image */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Backdrop]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Backdrop = + Backdrop( + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + resolution, + url, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Backdrop = apply { + if (validated) { + return@apply + } + + colors().ifPresent { it.forEach { it.validate() } } + resolution().ifPresent { it.validate() } + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (if (url.asKnown().isPresent) 1 else 0) + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** Resolution of the backdrop image */ + class Resolution + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val aspectRatio: JsonField, + private val height: JsonField, + private val width: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("aspect_ratio") + @ExcludeMissing + aspectRatio: JsonField = JsonMissing.of(), + @JsonProperty("height") + @ExcludeMissing + height: JsonField = JsonMissing.of(), + @JsonProperty("width") @ExcludeMissing width: JsonField = JsonMissing.of(), + ) : this(aspectRatio, height, width, mutableMapOf()) + + /** + * Aspect ratio of the image (width/height) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun aspectRatio(): Optional = aspectRatio.getOptional("aspect_ratio") + + /** + * Height of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun height(): Optional = height.getOptional("height") + + /** + * Width of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun width(): Optional = width.getOptional("width") + + /** + * Returns the raw JSON value of [aspectRatio]. + * + * Unlike [aspectRatio], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("aspect_ratio") + @ExcludeMissing + fun _aspectRatio(): JsonField = aspectRatio + + /** + * Returns the raw JSON value of [height]. + * + * Unlike [height], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("height") @ExcludeMissing fun _height(): JsonField = height + + /** + * Returns the raw JSON value of [width]. + * + * Unlike [width], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("width") @ExcludeMissing fun _width(): JsonField = width + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Resolution]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Resolution]. */ + class Builder internal constructor() { + + private var aspectRatio: JsonField = JsonMissing.of() + private var height: JsonField = JsonMissing.of() + private var width: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(resolution: Resolution) = apply { + aspectRatio = resolution.aspectRatio + height = resolution.height + width = resolution.width + additionalProperties = resolution.additionalProperties.toMutableMap() + } + + /** Aspect ratio of the image (width/height) */ + fun aspectRatio(aspectRatio: Double) = aspectRatio(JsonField.of(aspectRatio)) + + /** + * Sets [Builder.aspectRatio] to an arbitrary JSON value. + * + * You should usually call [Builder.aspectRatio] with a well-typed [Double] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun aspectRatio(aspectRatio: JsonField) = apply { + this.aspectRatio = aspectRatio + } + + /** Height of the image in pixels */ + fun height(height: Long) = height(JsonField.of(height)) + + /** + * Sets [Builder.height] to an arbitrary JSON value. + * + * You should usually call [Builder.height] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun height(height: JsonField) = apply { this.height = height } + + /** Width of the image in pixels */ + fun width(width: Long) = width(JsonField.of(width)) + + /** + * Sets [Builder.width] to an arbitrary JSON value. + * + * You should usually call [Builder.width] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun width(width: JsonField) = apply { this.width = width } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Resolution]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Resolution = + Resolution(aspectRatio, height, width, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Resolution = apply { + if (validated) { + return@apply + } + + aspectRatio() + height() + width() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (aspectRatio.asKnown().isPresent) 1 else 0) + + (if (height.asKnown().isPresent) 1 else 0) + + (if (width.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Resolution && + aspectRatio == other.aspectRatio && + height == other.height && + width == other.width && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(aspectRatio, height, width, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Resolution{aspectRatio=$aspectRatio, height=$height, width=$width, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Backdrop && + colors == other.colors && + resolution == other.resolution && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(colors, resolution, url, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Backdrop{colors=$colors, resolution=$resolution, url=$url, additionalProperties=$additionalProperties}" + } + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** Industry classification information for the brand */ + class Industries + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val eic: JsonField>, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("eic") @ExcludeMissing eic: JsonField> = JsonMissing.of() + ) : this(eic, mutableMapOf()) + + /** + * Easy Industry Classification - array of industry and subindustry pairs + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun eic(): Optional> = eic.getOptional("eic") + + /** + * Returns the raw JSON value of [eic]. + * + * Unlike [eic], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("eic") @ExcludeMissing fun _eic(): JsonField> = eic + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Industries]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Industries]. */ + class Builder internal constructor() { + + private var eic: JsonField>? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(industries: Industries) = apply { + eic = industries.eic.map { it.toMutableList() } + additionalProperties = industries.additionalProperties.toMutableMap() + } + + /** Easy Industry Classification - array of industry and subindustry pairs */ + fun eic(eic: List) = eic(JsonField.of(eic)) + + /** + * Sets [Builder.eic] to an arbitrary JSON value. + * + * You should usually call [Builder.eic] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun eic(eic: JsonField>) = apply { + this.eic = eic.map { it.toMutableList() } + } + + /** + * Adds a single [Eic] to [Builder.eic]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addEic(eic: Eic) = apply { + this.eic = + (this.eic ?: JsonField.of(mutableListOf())).also { + checkKnown("eic", it).add(eic) + } + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Industries]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Industries = + Industries( + (eic ?: JsonMissing.of()).map { it.toImmutable() }, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Industries = apply { + if (validated) { + return@apply + } + + eic().ifPresent { it.forEach { it.validate() } } + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (eic.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + class Eic + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val industry: JsonField, + private val subindustry: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("industry") + @ExcludeMissing + industry: JsonField = JsonMissing.of(), + @JsonProperty("subindustry") + @ExcludeMissing + subindustry: JsonField = JsonMissing.of(), + ) : this(industry, subindustry, mutableMapOf()) + + /** + * Industry classification enum + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun industry(): Industry = industry.getRequired("industry") + + /** + * Subindustry classification enum + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun subindustry(): Subindustry = subindustry.getRequired("subindustry") + + /** + * Returns the raw JSON value of [industry]. + * + * Unlike [industry], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("industry") + @ExcludeMissing + fun _industry(): JsonField = industry + + /** + * Returns the raw JSON value of [subindustry]. + * + * Unlike [subindustry], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("subindustry") + @ExcludeMissing + fun _subindustry(): JsonField = subindustry + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [Eic]. + * + * The following fields are required: + * ```java + * .industry() + * .subindustry() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Eic]. */ + class Builder internal constructor() { + + private var industry: JsonField? = null + private var subindustry: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(eic: Eic) = apply { + industry = eic.industry + subindustry = eic.subindustry + additionalProperties = eic.additionalProperties.toMutableMap() + } + + /** Industry classification enum */ + fun industry(industry: Industry) = industry(JsonField.of(industry)) + + /** + * Sets [Builder.industry] to an arbitrary JSON value. + * + * You should usually call [Builder.industry] with a well-typed [Industry] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun industry(industry: JsonField) = apply { this.industry = industry } + + /** Subindustry classification enum */ + fun subindustry(subindustry: Subindustry) = + subindustry(JsonField.of(subindustry)) + + /** + * Sets [Builder.subindustry] to an arbitrary JSON value. + * + * You should usually call [Builder.subindustry] with a well-typed [Subindustry] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun subindustry(subindustry: JsonField) = apply { + this.subindustry = subindustry + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Eic]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .industry() + * .subindustry() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): Eic = + Eic( + checkRequired("industry", industry), + checkRequired("subindustry", subindustry), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Eic = apply { + if (validated) { + return@apply + } + + industry().validate() + subindustry().validate() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (industry.asKnown().getOrNull()?.validity() ?: 0) + + (subindustry.asKnown().getOrNull()?.validity() ?: 0) + + /** Industry classification enum */ + class Industry + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue + fun _value(): JsonField = value + + companion object { + + @JvmField val AEROSPACE_DEFENSE = of("Aerospace & Defense") + + @JvmField val TECHNOLOGY = of("Technology") + + @JvmField val FINANCE = of("Finance") + + @JvmField val HEALTHCARE = of("Healthcare") + + @JvmField val RETAIL_E_COMMERCE = of("Retail & E-commerce") + + @JvmField val ENTERTAINMENT = of("Entertainment") + + @JvmField val EDUCATION = of("Education") + + @JvmField val GOVERNMENT_NONPROFIT = of("Government & Nonprofit") + + @JvmField val INDUSTRIAL_ENERGY = of("Industrial & Energy") + + @JvmField val AUTOMOTIVE_TRANSPORTATION = of("Automotive & Transportation") + + @JvmField val LIFESTYLE_LEISURE = of("Lifestyle & Leisure") + + @JvmField val LUXURY_FASHION = of("Luxury & Fashion") + + @JvmField val NEWS_MEDIA = of("News & Media") + + @JvmField val SPORTS = of("Sports") + + @JvmField val REAL_ESTATE_PROP_TECH = of("Real Estate & PropTech") + + @JvmField val LEGAL_COMPLIANCE = of("Legal & Compliance") + + @JvmField val TELECOMMUNICATIONS = of("Telecommunications") + + @JvmField val AGRICULTURE_FOOD = of("Agriculture & Food") + + @JvmField + val PROFESSIONAL_SERVICES_AGENCIES = of("Professional Services & Agencies") + + @JvmField val CHEMICALS_MATERIALS = of("Chemicals & Materials") + + @JvmField val LOGISTICS_SUPPLY_CHAIN = of("Logistics & Supply Chain") + + @JvmField val HOSPITALITY_TOURISM = of("Hospitality & Tourism") + + @JvmField + val CONSTRUCTION_BUILT_ENVIRONMENT = of("Construction & Built Environment") + + @JvmField + val CONSUMER_PACKAGED_GOODS_CPG = of("Consumer Packaged Goods (CPG)") + + @JvmStatic fun of(value: String) = Industry(JsonField.of(value)) + } + + /** An enum containing [Industry]'s known values. */ + enum class Known { + AEROSPACE_DEFENSE, + TECHNOLOGY, + FINANCE, + HEALTHCARE, + RETAIL_E_COMMERCE, + ENTERTAINMENT, + EDUCATION, + GOVERNMENT_NONPROFIT, + INDUSTRIAL_ENERGY, + AUTOMOTIVE_TRANSPORTATION, + LIFESTYLE_LEISURE, + LUXURY_FASHION, + NEWS_MEDIA, + SPORTS, + REAL_ESTATE_PROP_TECH, + LEGAL_COMPLIANCE, + TELECOMMUNICATIONS, + AGRICULTURE_FOOD, + PROFESSIONAL_SERVICES_AGENCIES, + CHEMICALS_MATERIALS, + LOGISTICS_SUPPLY_CHAIN, + HOSPITALITY_TOURISM, + CONSTRUCTION_BUILT_ENVIRONMENT, + CONSUMER_PACKAGED_GOODS_CPG, + } + + /** + * An enum containing [Industry]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [Industry] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For + * example, if the SDK is on an older version than the API, then the API may + * respond with new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + AEROSPACE_DEFENSE, + TECHNOLOGY, + FINANCE, + HEALTHCARE, + RETAIL_E_COMMERCE, + ENTERTAINMENT, + EDUCATION, + GOVERNMENT_NONPROFIT, + INDUSTRIAL_ENERGY, + AUTOMOTIVE_TRANSPORTATION, + LIFESTYLE_LEISURE, + LUXURY_FASHION, + NEWS_MEDIA, + SPORTS, + REAL_ESTATE_PROP_TECH, + LEGAL_COMPLIANCE, + TELECOMMUNICATIONS, + AGRICULTURE_FOOD, + PROFESSIONAL_SERVICES_AGENCIES, + CHEMICALS_MATERIALS, + LOGISTICS_SUPPLY_CHAIN, + HOSPITALITY_TOURISM, + CONSTRUCTION_BUILT_ENVIRONMENT, + CONSUMER_PACKAGED_GOODS_CPG, + /** + * An enum member indicating that [Industry] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or + * if you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + AEROSPACE_DEFENSE -> Value.AEROSPACE_DEFENSE + TECHNOLOGY -> Value.TECHNOLOGY + FINANCE -> Value.FINANCE + HEALTHCARE -> Value.HEALTHCARE + RETAIL_E_COMMERCE -> Value.RETAIL_E_COMMERCE + ENTERTAINMENT -> Value.ENTERTAINMENT + EDUCATION -> Value.EDUCATION + GOVERNMENT_NONPROFIT -> Value.GOVERNMENT_NONPROFIT + INDUSTRIAL_ENERGY -> Value.INDUSTRIAL_ENERGY + AUTOMOTIVE_TRANSPORTATION -> Value.AUTOMOTIVE_TRANSPORTATION + LIFESTYLE_LEISURE -> Value.LIFESTYLE_LEISURE + LUXURY_FASHION -> Value.LUXURY_FASHION + NEWS_MEDIA -> Value.NEWS_MEDIA + SPORTS -> Value.SPORTS + REAL_ESTATE_PROP_TECH -> Value.REAL_ESTATE_PROP_TECH + LEGAL_COMPLIANCE -> Value.LEGAL_COMPLIANCE + TELECOMMUNICATIONS -> Value.TELECOMMUNICATIONS + AGRICULTURE_FOOD -> Value.AGRICULTURE_FOOD + PROFESSIONAL_SERVICES_AGENCIES -> Value.PROFESSIONAL_SERVICES_AGENCIES + CHEMICALS_MATERIALS -> Value.CHEMICALS_MATERIALS + LOGISTICS_SUPPLY_CHAIN -> Value.LOGISTICS_SUPPLY_CHAIN + HOSPITALITY_TOURISM -> Value.HOSPITALITY_TOURISM + CONSTRUCTION_BUILT_ENVIRONMENT -> Value.CONSTRUCTION_BUILT_ENVIRONMENT + CONSUMER_PACKAGED_GOODS_CPG -> Value.CONSUMER_PACKAGED_GOODS_CPG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known + * and don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not + * a known member. + */ + fun known(): Known = + when (this) { + AEROSPACE_DEFENSE -> Known.AEROSPACE_DEFENSE + TECHNOLOGY -> Known.TECHNOLOGY + FINANCE -> Known.FINANCE + HEALTHCARE -> Known.HEALTHCARE + RETAIL_E_COMMERCE -> Known.RETAIL_E_COMMERCE + ENTERTAINMENT -> Known.ENTERTAINMENT + EDUCATION -> Known.EDUCATION + GOVERNMENT_NONPROFIT -> Known.GOVERNMENT_NONPROFIT + INDUSTRIAL_ENERGY -> Known.INDUSTRIAL_ENERGY + AUTOMOTIVE_TRANSPORTATION -> Known.AUTOMOTIVE_TRANSPORTATION + LIFESTYLE_LEISURE -> Known.LIFESTYLE_LEISURE + LUXURY_FASHION -> Known.LUXURY_FASHION + NEWS_MEDIA -> Known.NEWS_MEDIA + SPORTS -> Known.SPORTS + REAL_ESTATE_PROP_TECH -> Known.REAL_ESTATE_PROP_TECH + LEGAL_COMPLIANCE -> Known.LEGAL_COMPLIANCE + TELECOMMUNICATIONS -> Known.TELECOMMUNICATIONS + AGRICULTURE_FOOD -> Known.AGRICULTURE_FOOD + PROFESSIONAL_SERVICES_AGENCIES -> Known.PROFESSIONAL_SERVICES_AGENCIES + CHEMICALS_MATERIALS -> Known.CHEMICALS_MATERIALS + LOGISTICS_SUPPLY_CHAIN -> Known.LOGISTICS_SUPPLY_CHAIN + HOSPITALITY_TOURISM -> Known.HOSPITALITY_TOURISM + CONSTRUCTION_BUILT_ENVIRONMENT -> Known.CONSTRUCTION_BUILT_ENVIRONMENT + CONSUMER_PACKAGED_GOODS_CPG -> Known.CONSUMER_PACKAGED_GOODS_CPG + else -> throw BrandDevInvalidDataException("Unknown Industry: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not + * have the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Industry = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Industry && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** Subindustry classification enum */ + class Subindustry + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue + fun _value(): JsonField = value + + companion object { + + @JvmField + val DEFENSE_SYSTEMS_MILITARY_HARDWARE = + of("Defense Systems & Military Hardware") + + @JvmField val AEROSPACE_MANUFACTURING = of("Aerospace Manufacturing") + + @JvmField + val AVIONICS_NAVIGATION_TECHNOLOGY = of("Avionics & Navigation Technology") + + @JvmField + val SUBSEA_NAVAL_DEFENSE_SYSTEMS = of("Subsea & Naval Defense Systems") + + @JvmField + val SPACE_SATELLITE_TECHNOLOGY = of("Space & Satellite Technology") + + @JvmField + val DEFENSE_IT_SYSTEMS_INTEGRATION = of("Defense IT & Systems Integration") + + @JvmField val SOFTWARE_B2_B = of("Software (B2B)") + + @JvmField val SOFTWARE_B2_C = of("Software (B2C)") + + @JvmField + val CLOUD_INFRASTRUCTURE_DEV_OPS = of("Cloud Infrastructure & DevOps") + + @JvmField val CYBERSECURITY = of("Cybersecurity") + + @JvmField + val ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING = + of("Artificial Intelligence & Machine Learning") + + @JvmField + val DATA_INFRASTRUCTURE_ANALYTICS = of("Data Infrastructure & Analytics") + + @JvmField val HARDWARE_SEMICONDUCTORS = of("Hardware & Semiconductors") + + @JvmField val FINTECH_INFRASTRUCTURE = of("Fintech Infrastructure") + + @JvmField + val E_COMMERCE_MARKETPLACE_PLATFORMS = + of("eCommerce & Marketplace Platforms") + + @JvmField val DEVELOPER_TOOLS_APIS = of("Developer Tools & APIs") + + @JvmField val WEB3_BLOCKCHAIN = of("Web3 & Blockchain") + + @JvmField val XR_SPATIAL_COMPUTING = of("XR & Spatial Computing") + + @JvmField val BANKING_LENDING = of("Banking & Lending") + + @JvmField + val INVESTMENT_MANAGEMENT_WEALTH_TECH = + of("Investment Management & WealthTech") + + @JvmField val INSURANCE_INSUR_TECH = of("Insurance & InsurTech") + + @JvmField val PAYMENTS_MONEY_MOVEMENT = of("Payments & Money Movement") + + @JvmField + val ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS = + of("Accounting, Tax & Financial Planning Tools") + + @JvmField + val CAPITAL_MARKETS_TRADING_PLATFORMS = + of("Capital Markets & Trading Platforms") + + @JvmField + val FINANCIAL_INFRASTRUCTURE_APIS = of("Financial Infrastructure & APIs") + + @JvmField + val CREDIT_SCORING_RISK_MANAGEMENT = of("Credit Scoring & Risk Management") + + @JvmField + val CRYPTOCURRENCY_DIGITAL_ASSETS = of("Cryptocurrency & Digital Assets") + + @JvmField + val BNPL_ALTERNATIVE_FINANCING = of("BNPL & Alternative Financing") + + @JvmField + val HEALTHCARE_PROVIDERS_SERVICES = of("Healthcare Providers & Services") + + @JvmField + val PHARMACEUTICALS_DRUG_DEVELOPMENT = + of("Pharmaceuticals & Drug Development") + + @JvmField + val MEDICAL_DEVICES_DIAGNOSTICS = of("Medical Devices & Diagnostics") + + @JvmField val BIOTECHNOLOGY_GENOMICS = of("Biotechnology & Genomics") + + @JvmField + val DIGITAL_HEALTH_TELEMEDICINE = of("Digital Health & Telemedicine") + + @JvmField + val HEALTH_INSURANCE_BENEFITS_TECH = of("Health Insurance & Benefits Tech") + + @JvmField + val CLINICAL_TRIALS_RESEARCH_PLATFORMS = + of("Clinical Trials & Research Platforms") + + @JvmField val MENTAL_HEALTH_WELLNESS = of("Mental Health & Wellness") + + @JvmField val HEALTHCARE_IT_EHR_SYSTEMS = of("Healthcare IT & EHR Systems") + + @JvmField + val CONSUMER_HEALTH_WELLNESS_PRODUCTS = + of("Consumer Health & Wellness Products") + + @JvmField val ONLINE_MARKETPLACES = of("Online Marketplaces") + + @JvmField + val DIRECT_TO_CONSUMER_DTC_BRANDS = of("Direct-to-Consumer (DTC) Brands") + + @JvmField + val RETAIL_TECH_POINT_OF_SALE_SYSTEMS = + of("Retail Tech & Point-of-Sale Systems") + + @JvmField + val OMNICHANNEL_IN_STORE_RETAIL = of("Omnichannel & In-Store Retail") + + @JvmField + val E_COMMERCE_ENABLEMENT_INFRASTRUCTURE = + of("E-commerce Enablement & Infrastructure") + + @JvmField + val SUBSCRIPTION_MEMBERSHIP_COMMERCE = + of("Subscription & Membership Commerce") + + @JvmField + val SOCIAL_COMMERCE_INFLUENCER_PLATFORMS = + of("Social Commerce & Influencer Platforms") + + @JvmField val FASHION_APPAREL_RETAIL = of("Fashion & Apparel Retail") + + @JvmField + val FOOD_BEVERAGE_GROCERY_E_COMMERCE = + of("Food, Beverage & Grocery E-commerce") + + @JvmField + val STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = + of("Streaming Platforms (Video, Music, Audio)") + + @JvmField + val GAMING_INTERACTIVE_ENTERTAINMENT = + of("Gaming & Interactive Entertainment") + + @JvmField + val CREATOR_ECONOMY_INFLUENCER_PLATFORMS = + of("Creator Economy & Influencer Platforms") + + @JvmField + val ADVERTISING_ADTECH_MEDIA_BUYING = + of("Advertising, Adtech & Media Buying") + + @JvmField + val FILM_TV_PRODUCTION_STUDIOS = of("Film, TV & Production Studios") + + @JvmField + val EVENTS_VENUES_LIVE_ENTERTAINMENT = + of("Events, Venues & Live Entertainment") + + @JvmField + val VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = + of("Virtual Worlds & Metaverse Experiences") + + @JvmField + val K_12_EDUCATION_PLATFORMS_TOOLS = of("K-12 Education Platforms & Tools") + + @JvmField + val HIGHER_EDUCATION_UNIVERSITY_TECH = + of("Higher Education & University Tech") + + @JvmField val ONLINE_LEARNING_MOO_CS = of("Online Learning & MOOCs") + + @JvmField val TEST_PREP_CERTIFICATION = of("Test Prep & Certification") + + @JvmField + val CORPORATE_TRAINING_UPSKILLING = of("Corporate Training & Upskilling") + + @JvmField + val TUTORING_SUPPLEMENTAL_LEARNING = of("Tutoring & Supplemental Learning") + + @JvmField + val EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS = + of("Education Management Systems (LMS/SIS)") + + @JvmField val LANGUAGE_LEARNING = of("Language Learning") + + @JvmField + val CREATOR_LED_COHORT_BASED_COURSES = + of("Creator-Led & Cohort-Based Courses") + + @JvmField + val SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS = + of("Special Education & Accessibility Tools") + + @JvmField + val GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES = + of("Government Technology & Digital Services") + + @JvmField + val CIVIC_ENGAGEMENT_POLICY_PLATFORMS = + of("Civic Engagement & Policy Platforms") + + @JvmField + val INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID = + of("International Development & Humanitarian Aid") + + @JvmField val PHILANTHROPY_GRANTMAKING = of("Philanthropy & Grantmaking") + + @JvmField + val NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS = + of("Nonprofit Operations & Fundraising Tools") + + @JvmField + val PUBLIC_HEALTH_SOCIAL_SERVICES = of("Public Health & Social Services") + + @JvmField + val EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS = + of("Education & Youth Development Programs") + + @JvmField + val ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS = + of("Environmental & Climate Action Organizations") + + @JvmField + val LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY = + of("Legal Aid & Social Justice Advocacy") + + @JvmField + val MUNICIPAL_INFRASTRUCTURE_SERVICES = + of("Municipal & Infrastructure Services") + + @JvmField + val MANUFACTURING_INDUSTRIAL_AUTOMATION = + of("Manufacturing & Industrial Automation") + + @JvmField + val ENERGY_PRODUCTION_OIL_GAS_NUCLEAR = + of("Energy Production (Oil, Gas, Nuclear)") + + @JvmField + val RENEWABLE_ENERGY_CLEANTECH = of("Renewable Energy & Cleantech") + + @JvmField + val UTILITIES_GRID_INFRASTRUCTURE = of("Utilities & Grid Infrastructure") + + @JvmField + val INDUSTRIAL_IO_T_MONITORING_SYSTEMS = + of("Industrial IoT & Monitoring Systems") + + @JvmField + val CONSTRUCTION_HEAVY_EQUIPMENT = of("Construction & Heavy Equipment") + + @JvmField val MINING_NATURAL_RESOURCES = of("Mining & Natural Resources") + + @JvmField + val ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY = + of("Environmental Engineering & Sustainability") + + @JvmField + val ENERGY_STORAGE_BATTERY_TECHNOLOGY = + of("Energy Storage & Battery Technology") + + @JvmField + val AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING = + of("Automotive OEMs & Vehicle Manufacturing") + + @JvmField + val ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE = + of("Electric Vehicles (EVs) & Charging Infrastructure") + + @JvmField + val MOBILITY_AS_A_SERVICE_MAA_S = of("Mobility-as-a-Service (MaaS)") + + @JvmField val FLEET_MANAGEMENT = of("Fleet Management") + + @JvmField + val PUBLIC_TRANSIT_URBAN_MOBILITY = of("Public Transit & Urban Mobility") + + @JvmField val AUTONOMOUS_VEHICLES_ADAS = of("Autonomous Vehicles & ADAS") + + @JvmField + val AFTERMARKET_PARTS_SERVICES = of("Aftermarket Parts & Services") + + @JvmField + val TELEMATICS_VEHICLE_CONNECTIVITY = + of("Telematics & Vehicle Connectivity") + + @JvmField + val AVIATION_AEROSPACE_TRANSPORT = of("Aviation & Aerospace Transport") + + @JvmField val MARITIME_SHIPPING = of("Maritime Shipping") + + @JvmField val FITNESS_WELLNESS = of("Fitness & Wellness") + + @JvmField val BEAUTY_PERSONAL_CARE = of("Beauty & Personal Care") + + @JvmField val HOME_LIVING = of("Home & Living") + + @JvmField val DATING_RELATIONSHIPS = of("Dating & Relationships") + + @JvmField val HOBBIES_CRAFTS_DIY = of("Hobbies, Crafts & DIY") + + @JvmField val OUTDOOR_RECREATIONAL_GEAR = of("Outdoor & Recreational Gear") + + @JvmField + val EVENTS_EXPERIENCES_TICKETING_PLATFORMS = + of("Events, Experiences & Ticketing Platforms") + + @JvmField val DESIGNER_LUXURY_APPAREL = of("Designer & Luxury Apparel") + + @JvmField + val ACCESSORIES_JEWELRY_WATCHES = of("Accessories, Jewelry & Watches") + + @JvmField val FOOTWEAR_LEATHER_GOODS = of("Footwear & Leather Goods") + + @JvmField val BEAUTY_FRAGRANCE_SKINCARE = of("Beauty, Fragrance & Skincare") + + @JvmField + val FASHION_MARKETPLACES_RETAIL_PLATFORMS = + of("Fashion Marketplaces & Retail Platforms") + + @JvmField + val SUSTAINABLE_ETHICAL_FASHION = of("Sustainable & Ethical Fashion") + + @JvmField + val RESALE_VINTAGE_CIRCULAR_FASHION = + of("Resale, Vintage & Circular Fashion") + + @JvmField + val FASHION_TECH_VIRTUAL_TRY_ONS = of("Fashion Tech & Virtual Try-Ons") + + @JvmField + val STREETWEAR_EMERGING_LUXURY = of("Streetwear & Emerging Luxury") + + @JvmField val COUTURE_MADE_TO_MEASURE = of("Couture & Made-to-Measure") + + @JvmField + val NEWS_PUBLISHING_JOURNALISM = of("News Publishing & Journalism") + + @JvmField + val DIGITAL_MEDIA_CONTENT_PLATFORMS = + of("Digital Media & Content Platforms") + + @JvmField val BROADCASTING_TV_RADIO = of("Broadcasting (TV & Radio)") + + @JvmField val PODCASTING_AUDIO_MEDIA = of("Podcasting & Audio Media") + + @JvmField + val NEWS_AGGREGATORS_CURATION_TOOLS = + of("News Aggregators & Curation Tools") + + @JvmField + val INDEPENDENT_CREATOR_LED_MEDIA = of("Independent & Creator-Led Media") + + @JvmField + val NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS = + of("Newsletters & Substack-Style Platforms") + + @JvmField + val POLITICAL_INVESTIGATIVE_MEDIA = of("Political & Investigative Media") + + @JvmField val TRADE_NICHE_PUBLICATIONS = of("Trade & Niche Publications") + + @JvmField + val MEDIA_MONITORING_ANALYTICS = of("Media Monitoring & Analytics") + + @JvmField + val PROFESSIONAL_TEAMS_LEAGUES = of("Professional Teams & Leagues") + + @JvmField val SPORTS_MEDIA_BROADCASTING = of("Sports Media & Broadcasting") + + @JvmField + val SPORTS_BETTING_FANTASY_SPORTS = of("Sports Betting & Fantasy Sports") + + @JvmField + val FITNESS_ATHLETIC_TRAINING_PLATFORMS = + of("Fitness & Athletic Training Platforms") + + @JvmField val SPORTSWEAR_EQUIPMENT = of("Sportswear & Equipment") + + @JvmField + val ESPORTS_COMPETITIVE_GAMING = of("Esports & Competitive Gaming") + + @JvmField + val SPORTS_VENUES_EVENT_MANAGEMENT = of("Sports Venues & Event Management") + + @JvmField + val ATHLETE_MANAGEMENT_TALENT_AGENCIES = + of("Athlete Management & Talent Agencies") + + @JvmField + val SPORTS_TECH_PERFORMANCE_ANALYTICS = + of("Sports Tech & Performance Analytics") + + @JvmField + val YOUTH_AMATEUR_COLLEGIATE_SPORTS = + of("Youth, Amateur & Collegiate Sports") + + @JvmField val REAL_ESTATE_MARKETPLACES = of("Real Estate Marketplaces") + + @JvmField + val PROPERTY_MANAGEMENT_SOFTWARE = of("Property Management Software") + + @JvmField val RENTAL_PLATFORMS = of("Rental Platforms") + + @JvmField val MORTGAGE_LENDING_TECH = of("Mortgage & Lending Tech") + + @JvmField + val REAL_ESTATE_INVESTMENT_PLATFORMS = + of("Real Estate Investment Platforms") + + @JvmField val LAW_FIRMS_LEGAL_SERVICES = of("Law Firms & Legal Services") + + @JvmField val LEGAL_TECH_AUTOMATION = of("Legal Tech & Automation") + + @JvmField val REGULATORY_COMPLIANCE = of("Regulatory Compliance") + + @JvmField + val E_DISCOVERY_LITIGATION_TOOLS = of("E-Discovery & Litigation Tools") + + @JvmField val CONTRACT_MANAGEMENT = of("Contract Management") + + @JvmField + val GOVERNANCE_RISK_COMPLIANCE_GRC = + of("Governance, Risk & Compliance (GRC)") + + @JvmField val IP_TRADEMARK_MANAGEMENT = of("IP & Trademark Management") + + @JvmField + val LEGAL_RESEARCH_INTELLIGENCE = of("Legal Research & Intelligence") + + @JvmField + val COMPLIANCE_TRAINING_CERTIFICATION = + of("Compliance Training & Certification") + + @JvmField + val WHISTLEBLOWER_ETHICS_REPORTING = of("Whistleblower & Ethics Reporting") + + @JvmField + val MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G = + of("Mobile & Wireless Networks (3G/4G/5G)") + + @JvmField val BROADBAND_FIBER_INTERNET = of("Broadband & Fiber Internet") + + @JvmField + val SATELLITE_SPACE_BASED_COMMUNICATIONS = + of("Satellite & Space-Based Communications") + + @JvmField + val NETWORK_EQUIPMENT_INFRASTRUCTURE = + of("Network Equipment & Infrastructure") + + @JvmField + val TELECOM_BILLING_OSS_BSS_SYSTEMS = + of("Telecom Billing & OSS/BSS Systems") + + @JvmField + val VO_IP_UNIFIED_COMMUNICATIONS = of("VoIP & Unified Communications") + + @JvmField + val INTERNET_SERVICE_PROVIDERS_IS_PS = + of("Internet Service Providers (ISPs)") + + @JvmField + val EDGE_COMPUTING_NETWORK_VIRTUALIZATION = + of("Edge Computing & Network Virtualization") + + @JvmField val IO_T_CONNECTIVITY_PLATFORMS = of("IoT Connectivity Platforms") + + @JvmField + val PRECISION_AGRICULTURE_AG_TECH = of("Precision Agriculture & AgTech") + + @JvmField val CROP_LIVESTOCK_PRODUCTION = of("Crop & Livestock Production") + + @JvmField + val FOOD_BEVERAGE_MANUFACTURING_PROCESSING = + of("Food & Beverage Manufacturing & Processing") + + @JvmField val FOOD_DISTRIBUTION = of("Food Distribution") + + @JvmField val RESTAURANTS_FOOD_SERVICE = of("Restaurants & Food Service") + + @JvmField + val AGRICULTURAL_INPUTS_EQUIPMENT = of("Agricultural Inputs & Equipment") + + @JvmField + val SUSTAINABLE_REGENERATIVE_AGRICULTURE = + of("Sustainable & Regenerative Agriculture") + + @JvmField val SEAFOOD_AQUACULTURE = of("Seafood & Aquaculture") + + @JvmField val MANAGEMENT_CONSULTING = of("Management Consulting") + + @JvmField + val MARKETING_ADVERTISING_AGENCIES = of("Marketing & Advertising Agencies") + + @JvmField + val DESIGN_BRANDING_CREATIVE_STUDIOS = + of("Design, Branding & Creative Studios") + + @JvmField + val IT_SERVICES_MANAGED_SERVICES = of("IT Services & Managed Services") + + @JvmField + val STAFFING_RECRUITING_TALENT = of("Staffing, Recruiting & Talent") + + @JvmField val ACCOUNTING_TAX_FIRMS = of("Accounting & Tax Firms") + + @JvmField + val PUBLIC_RELATIONS_COMMUNICATIONS = + of("Public Relations & Communications") + + @JvmField + val BUSINESS_PROCESS_OUTSOURCING_BPO = + of("Business Process Outsourcing (BPO)") + + @JvmField + val PROFESSIONAL_TRAINING_COACHING = of("Professional Training & Coaching") + + @JvmField val SPECIALTY_CHEMICALS = of("Specialty Chemicals") + + @JvmField val COMMODITY_PETROCHEMICALS = of("Commodity & Petrochemicals") + + @JvmField val POLYMERS_PLASTICS_RUBBER = of("Polymers, Plastics & Rubber") + + @JvmField + val COATINGS_ADHESIVES_SEALANTS = of("Coatings, Adhesives & Sealants") + + @JvmField val INDUSTRIAL_GASES = of("Industrial Gases") + + @JvmField + val ADVANCED_MATERIALS_COMPOSITES = of("Advanced Materials & Composites") + + @JvmField + val BATTERY_MATERIALS_ENERGY_STORAGE = + of("Battery Materials & Energy Storage") + + @JvmField + val ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS = + of("Electronic Materials & Semiconductor Chemicals") + + @JvmField val AGROCHEMICALS_FERTILIZERS = of("Agrochemicals & Fertilizers") + + @JvmField + val FREIGHT_TRANSPORTATION_TECH = of("Freight & Transportation Tech") + + @JvmField val LAST_MILE_DELIVERY = of("Last-Mile Delivery") + + @JvmField val WAREHOUSE_AUTOMATION = of("Warehouse Automation") + + @JvmField + val SUPPLY_CHAIN_VISIBILITY_PLATFORMS = + of("Supply Chain Visibility Platforms") + + @JvmField val LOGISTICS_MARKETPLACES = of("Logistics Marketplaces") + + @JvmField + val SHIPPING_FREIGHT_FORWARDING = of("Shipping & Freight Forwarding") + + @JvmField val COLD_CHAIN_LOGISTICS = of("Cold Chain Logistics") + + @JvmField val REVERSE_LOGISTICS_RETURNS = of("Reverse Logistics & Returns") + + @JvmField val CROSS_BORDER_TRADE_TECH = of("Cross-Border Trade Tech") + + @JvmField + val TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS = + of("Transportation Management Systems (TMS)") + + @JvmField val HOTELS_ACCOMMODATION = of("Hotels & Accommodation") + + @JvmField + val VACATION_RENTALS_SHORT_TERM_STAYS = + of("Vacation Rentals & Short-Term Stays") + + @JvmField + val RESTAURANT_TECH_MANAGEMENT = of("Restaurant Tech & Management") + + @JvmField val TRAVEL_BOOKING_PLATFORMS = of("Travel Booking Platforms") + + @JvmField + val TOURISM_EXPERIENCES_ACTIVITIES = of("Tourism Experiences & Activities") + + @JvmField + val CRUISE_LINES_MARINE_TOURISM = of("Cruise Lines & Marine Tourism") + + @JvmField + val HOSPITALITY_MANAGEMENT_SYSTEMS = of("Hospitality Management Systems") + + @JvmField val EVENT_VENUE_MANAGEMENT = of("Event & Venue Management") + + @JvmField + val CORPORATE_TRAVEL_MANAGEMENT = of("Corporate Travel Management") + + @JvmField + val TRAVEL_INSURANCE_PROTECTION = of("Travel Insurance & Protection") + + @JvmField + val CONSTRUCTION_MANAGEMENT_SOFTWARE = + of("Construction Management Software") + + @JvmField val BIM_CAD_DESIGN_TOOLS = of("BIM/CAD & Design Tools") + + @JvmField val CONSTRUCTION_MARKETPLACES = of("Construction Marketplaces") + + @JvmField + val EQUIPMENT_RENTAL_MANAGEMENT = of("Equipment Rental & Management") + + @JvmField + val BUILDING_MATERIALS_PROCUREMENT = of("Building Materials & Procurement") + + @JvmField + val CONSTRUCTION_WORKFORCE_MANAGEMENT = + of("Construction Workforce Management") + + @JvmField + val PROJECT_ESTIMATION_BIDDING = of("Project Estimation & Bidding") + + @JvmField + val MODULAR_PREFAB_CONSTRUCTION = of("Modular & Prefab Construction") + + @JvmField + val CONSTRUCTION_SAFETY_COMPLIANCE = of("Construction Safety & Compliance") + + @JvmField val SMART_BUILDING_TECHNOLOGY = of("Smart Building Technology") + + @JvmField val FOOD_BEVERAGE_CPG = of("Food & Beverage CPG") + + @JvmField val HOME_PERSONAL_CARE_CPG = of("Home & Personal Care CPG") + + @JvmField val CPG_ANALYTICS_INSIGHTS = of("CPG Analytics & Insights") + + @JvmField + val DIRECT_TO_CONSUMER_CPG_BRANDS = of("Direct-to-Consumer CPG Brands") + + @JvmField + val CPG_SUPPLY_CHAIN_DISTRIBUTION = of("CPG Supply Chain & Distribution") + + @JvmField + val PRIVATE_LABEL_MANUFACTURING = of("Private Label Manufacturing") + + @JvmField val CPG_RETAIL_INTELLIGENCE = of("CPG Retail Intelligence") + + @JvmField val SUSTAINABLE_CPG_PACKAGING = of("Sustainable CPG & Packaging") + + @JvmField val BEAUTY_COSMETICS_CPG = of("Beauty & Cosmetics CPG") + + @JvmField val HEALTH_WELLNESS_CPG = of("Health & Wellness CPG") + + @JvmStatic fun of(value: String) = Subindustry(JsonField.of(value)) + } + + /** An enum containing [Subindustry]'s known values. */ + enum class Known { + DEFENSE_SYSTEMS_MILITARY_HARDWARE, + AEROSPACE_MANUFACTURING, + AVIONICS_NAVIGATION_TECHNOLOGY, + SUBSEA_NAVAL_DEFENSE_SYSTEMS, + SPACE_SATELLITE_TECHNOLOGY, + DEFENSE_IT_SYSTEMS_INTEGRATION, + SOFTWARE_B2_B, + SOFTWARE_B2_C, + CLOUD_INFRASTRUCTURE_DEV_OPS, + CYBERSECURITY, + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING, + DATA_INFRASTRUCTURE_ANALYTICS, + HARDWARE_SEMICONDUCTORS, + FINTECH_INFRASTRUCTURE, + E_COMMERCE_MARKETPLACE_PLATFORMS, + DEVELOPER_TOOLS_APIS, + WEB3_BLOCKCHAIN, + XR_SPATIAL_COMPUTING, + BANKING_LENDING, + INVESTMENT_MANAGEMENT_WEALTH_TECH, + INSURANCE_INSUR_TECH, + PAYMENTS_MONEY_MOVEMENT, + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS, + CAPITAL_MARKETS_TRADING_PLATFORMS, + FINANCIAL_INFRASTRUCTURE_APIS, + CREDIT_SCORING_RISK_MANAGEMENT, + CRYPTOCURRENCY_DIGITAL_ASSETS, + BNPL_ALTERNATIVE_FINANCING, + HEALTHCARE_PROVIDERS_SERVICES, + PHARMACEUTICALS_DRUG_DEVELOPMENT, + MEDICAL_DEVICES_DIAGNOSTICS, + BIOTECHNOLOGY_GENOMICS, + DIGITAL_HEALTH_TELEMEDICINE, + HEALTH_INSURANCE_BENEFITS_TECH, + CLINICAL_TRIALS_RESEARCH_PLATFORMS, + MENTAL_HEALTH_WELLNESS, + HEALTHCARE_IT_EHR_SYSTEMS, + CONSUMER_HEALTH_WELLNESS_PRODUCTS, + ONLINE_MARKETPLACES, + DIRECT_TO_CONSUMER_DTC_BRANDS, + RETAIL_TECH_POINT_OF_SALE_SYSTEMS, + OMNICHANNEL_IN_STORE_RETAIL, + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE, + SUBSCRIPTION_MEMBERSHIP_COMMERCE, + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS, + FASHION_APPAREL_RETAIL, + FOOD_BEVERAGE_GROCERY_E_COMMERCE, + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO, + GAMING_INTERACTIVE_ENTERTAINMENT, + CREATOR_ECONOMY_INFLUENCER_PLATFORMS, + ADVERTISING_ADTECH_MEDIA_BUYING, + FILM_TV_PRODUCTION_STUDIOS, + EVENTS_VENUES_LIVE_ENTERTAINMENT, + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES, + K_12_EDUCATION_PLATFORMS_TOOLS, + HIGHER_EDUCATION_UNIVERSITY_TECH, + ONLINE_LEARNING_MOO_CS, + TEST_PREP_CERTIFICATION, + CORPORATE_TRAINING_UPSKILLING, + TUTORING_SUPPLEMENTAL_LEARNING, + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS, + LANGUAGE_LEARNING, + CREATOR_LED_COHORT_BASED_COURSES, + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS, + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES, + CIVIC_ENGAGEMENT_POLICY_PLATFORMS, + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID, + PHILANTHROPY_GRANTMAKING, + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS, + PUBLIC_HEALTH_SOCIAL_SERVICES, + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS, + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS, + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY, + MUNICIPAL_INFRASTRUCTURE_SERVICES, + MANUFACTURING_INDUSTRIAL_AUTOMATION, + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR, + RENEWABLE_ENERGY_CLEANTECH, + UTILITIES_GRID_INFRASTRUCTURE, + INDUSTRIAL_IO_T_MONITORING_SYSTEMS, + CONSTRUCTION_HEAVY_EQUIPMENT, + MINING_NATURAL_RESOURCES, + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY, + ENERGY_STORAGE_BATTERY_TECHNOLOGY, + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING, + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE, + MOBILITY_AS_A_SERVICE_MAA_S, + FLEET_MANAGEMENT, + PUBLIC_TRANSIT_URBAN_MOBILITY, + AUTONOMOUS_VEHICLES_ADAS, + AFTERMARKET_PARTS_SERVICES, + TELEMATICS_VEHICLE_CONNECTIVITY, + AVIATION_AEROSPACE_TRANSPORT, + MARITIME_SHIPPING, + FITNESS_WELLNESS, + BEAUTY_PERSONAL_CARE, + HOME_LIVING, + DATING_RELATIONSHIPS, + HOBBIES_CRAFTS_DIY, + OUTDOOR_RECREATIONAL_GEAR, + EVENTS_EXPERIENCES_TICKETING_PLATFORMS, + DESIGNER_LUXURY_APPAREL, + ACCESSORIES_JEWELRY_WATCHES, + FOOTWEAR_LEATHER_GOODS, + BEAUTY_FRAGRANCE_SKINCARE, + FASHION_MARKETPLACES_RETAIL_PLATFORMS, + SUSTAINABLE_ETHICAL_FASHION, + RESALE_VINTAGE_CIRCULAR_FASHION, + FASHION_TECH_VIRTUAL_TRY_ONS, + STREETWEAR_EMERGING_LUXURY, + COUTURE_MADE_TO_MEASURE, + NEWS_PUBLISHING_JOURNALISM, + DIGITAL_MEDIA_CONTENT_PLATFORMS, + BROADCASTING_TV_RADIO, + PODCASTING_AUDIO_MEDIA, + NEWS_AGGREGATORS_CURATION_TOOLS, + INDEPENDENT_CREATOR_LED_MEDIA, + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS, + POLITICAL_INVESTIGATIVE_MEDIA, + TRADE_NICHE_PUBLICATIONS, + MEDIA_MONITORING_ANALYTICS, + PROFESSIONAL_TEAMS_LEAGUES, + SPORTS_MEDIA_BROADCASTING, + SPORTS_BETTING_FANTASY_SPORTS, + FITNESS_ATHLETIC_TRAINING_PLATFORMS, + SPORTSWEAR_EQUIPMENT, + ESPORTS_COMPETITIVE_GAMING, + SPORTS_VENUES_EVENT_MANAGEMENT, + ATHLETE_MANAGEMENT_TALENT_AGENCIES, + SPORTS_TECH_PERFORMANCE_ANALYTICS, + YOUTH_AMATEUR_COLLEGIATE_SPORTS, + REAL_ESTATE_MARKETPLACES, + PROPERTY_MANAGEMENT_SOFTWARE, + RENTAL_PLATFORMS, + MORTGAGE_LENDING_TECH, + REAL_ESTATE_INVESTMENT_PLATFORMS, + LAW_FIRMS_LEGAL_SERVICES, + LEGAL_TECH_AUTOMATION, + REGULATORY_COMPLIANCE, + E_DISCOVERY_LITIGATION_TOOLS, + CONTRACT_MANAGEMENT, + GOVERNANCE_RISK_COMPLIANCE_GRC, + IP_TRADEMARK_MANAGEMENT, + LEGAL_RESEARCH_INTELLIGENCE, + COMPLIANCE_TRAINING_CERTIFICATION, + WHISTLEBLOWER_ETHICS_REPORTING, + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G, + BROADBAND_FIBER_INTERNET, + SATELLITE_SPACE_BASED_COMMUNICATIONS, + NETWORK_EQUIPMENT_INFRASTRUCTURE, + TELECOM_BILLING_OSS_BSS_SYSTEMS, + VO_IP_UNIFIED_COMMUNICATIONS, + INTERNET_SERVICE_PROVIDERS_IS_PS, + EDGE_COMPUTING_NETWORK_VIRTUALIZATION, + IO_T_CONNECTIVITY_PLATFORMS, + PRECISION_AGRICULTURE_AG_TECH, + CROP_LIVESTOCK_PRODUCTION, + FOOD_BEVERAGE_MANUFACTURING_PROCESSING, + FOOD_DISTRIBUTION, + RESTAURANTS_FOOD_SERVICE, + AGRICULTURAL_INPUTS_EQUIPMENT, + SUSTAINABLE_REGENERATIVE_AGRICULTURE, + SEAFOOD_AQUACULTURE, + MANAGEMENT_CONSULTING, + MARKETING_ADVERTISING_AGENCIES, + DESIGN_BRANDING_CREATIVE_STUDIOS, + IT_SERVICES_MANAGED_SERVICES, + STAFFING_RECRUITING_TALENT, + ACCOUNTING_TAX_FIRMS, + PUBLIC_RELATIONS_COMMUNICATIONS, + BUSINESS_PROCESS_OUTSOURCING_BPO, + PROFESSIONAL_TRAINING_COACHING, + SPECIALTY_CHEMICALS, + COMMODITY_PETROCHEMICALS, + POLYMERS_PLASTICS_RUBBER, + COATINGS_ADHESIVES_SEALANTS, + INDUSTRIAL_GASES, + ADVANCED_MATERIALS_COMPOSITES, + BATTERY_MATERIALS_ENERGY_STORAGE, + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS, + AGROCHEMICALS_FERTILIZERS, + FREIGHT_TRANSPORTATION_TECH, + LAST_MILE_DELIVERY, + WAREHOUSE_AUTOMATION, + SUPPLY_CHAIN_VISIBILITY_PLATFORMS, + LOGISTICS_MARKETPLACES, + SHIPPING_FREIGHT_FORWARDING, + COLD_CHAIN_LOGISTICS, + REVERSE_LOGISTICS_RETURNS, + CROSS_BORDER_TRADE_TECH, + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS, + HOTELS_ACCOMMODATION, + VACATION_RENTALS_SHORT_TERM_STAYS, + RESTAURANT_TECH_MANAGEMENT, + TRAVEL_BOOKING_PLATFORMS, + TOURISM_EXPERIENCES_ACTIVITIES, + CRUISE_LINES_MARINE_TOURISM, + HOSPITALITY_MANAGEMENT_SYSTEMS, + EVENT_VENUE_MANAGEMENT, + CORPORATE_TRAVEL_MANAGEMENT, + TRAVEL_INSURANCE_PROTECTION, + CONSTRUCTION_MANAGEMENT_SOFTWARE, + BIM_CAD_DESIGN_TOOLS, + CONSTRUCTION_MARKETPLACES, + EQUIPMENT_RENTAL_MANAGEMENT, + BUILDING_MATERIALS_PROCUREMENT, + CONSTRUCTION_WORKFORCE_MANAGEMENT, + PROJECT_ESTIMATION_BIDDING, + MODULAR_PREFAB_CONSTRUCTION, + CONSTRUCTION_SAFETY_COMPLIANCE, + SMART_BUILDING_TECHNOLOGY, + FOOD_BEVERAGE_CPG, + HOME_PERSONAL_CARE_CPG, + CPG_ANALYTICS_INSIGHTS, + DIRECT_TO_CONSUMER_CPG_BRANDS, + CPG_SUPPLY_CHAIN_DISTRIBUTION, + PRIVATE_LABEL_MANUFACTURING, + CPG_RETAIL_INTELLIGENCE, + SUSTAINABLE_CPG_PACKAGING, + BEAUTY_COSMETICS_CPG, + HEALTH_WELLNESS_CPG, + } + + /** + * An enum containing [Subindustry]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [Subindustry] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For + * example, if the SDK is on an older version than the API, then the API may + * respond with new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + DEFENSE_SYSTEMS_MILITARY_HARDWARE, + AEROSPACE_MANUFACTURING, + AVIONICS_NAVIGATION_TECHNOLOGY, + SUBSEA_NAVAL_DEFENSE_SYSTEMS, + SPACE_SATELLITE_TECHNOLOGY, + DEFENSE_IT_SYSTEMS_INTEGRATION, + SOFTWARE_B2_B, + SOFTWARE_B2_C, + CLOUD_INFRASTRUCTURE_DEV_OPS, + CYBERSECURITY, + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING, + DATA_INFRASTRUCTURE_ANALYTICS, + HARDWARE_SEMICONDUCTORS, + FINTECH_INFRASTRUCTURE, + E_COMMERCE_MARKETPLACE_PLATFORMS, + DEVELOPER_TOOLS_APIS, + WEB3_BLOCKCHAIN, + XR_SPATIAL_COMPUTING, + BANKING_LENDING, + INVESTMENT_MANAGEMENT_WEALTH_TECH, + INSURANCE_INSUR_TECH, + PAYMENTS_MONEY_MOVEMENT, + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS, + CAPITAL_MARKETS_TRADING_PLATFORMS, + FINANCIAL_INFRASTRUCTURE_APIS, + CREDIT_SCORING_RISK_MANAGEMENT, + CRYPTOCURRENCY_DIGITAL_ASSETS, + BNPL_ALTERNATIVE_FINANCING, + HEALTHCARE_PROVIDERS_SERVICES, + PHARMACEUTICALS_DRUG_DEVELOPMENT, + MEDICAL_DEVICES_DIAGNOSTICS, + BIOTECHNOLOGY_GENOMICS, + DIGITAL_HEALTH_TELEMEDICINE, + HEALTH_INSURANCE_BENEFITS_TECH, + CLINICAL_TRIALS_RESEARCH_PLATFORMS, + MENTAL_HEALTH_WELLNESS, + HEALTHCARE_IT_EHR_SYSTEMS, + CONSUMER_HEALTH_WELLNESS_PRODUCTS, + ONLINE_MARKETPLACES, + DIRECT_TO_CONSUMER_DTC_BRANDS, + RETAIL_TECH_POINT_OF_SALE_SYSTEMS, + OMNICHANNEL_IN_STORE_RETAIL, + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE, + SUBSCRIPTION_MEMBERSHIP_COMMERCE, + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS, + FASHION_APPAREL_RETAIL, + FOOD_BEVERAGE_GROCERY_E_COMMERCE, + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO, + GAMING_INTERACTIVE_ENTERTAINMENT, + CREATOR_ECONOMY_INFLUENCER_PLATFORMS, + ADVERTISING_ADTECH_MEDIA_BUYING, + FILM_TV_PRODUCTION_STUDIOS, + EVENTS_VENUES_LIVE_ENTERTAINMENT, + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES, + K_12_EDUCATION_PLATFORMS_TOOLS, + HIGHER_EDUCATION_UNIVERSITY_TECH, + ONLINE_LEARNING_MOO_CS, + TEST_PREP_CERTIFICATION, + CORPORATE_TRAINING_UPSKILLING, + TUTORING_SUPPLEMENTAL_LEARNING, + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS, + LANGUAGE_LEARNING, + CREATOR_LED_COHORT_BASED_COURSES, + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS, + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES, + CIVIC_ENGAGEMENT_POLICY_PLATFORMS, + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID, + PHILANTHROPY_GRANTMAKING, + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS, + PUBLIC_HEALTH_SOCIAL_SERVICES, + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS, + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS, + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY, + MUNICIPAL_INFRASTRUCTURE_SERVICES, + MANUFACTURING_INDUSTRIAL_AUTOMATION, + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR, + RENEWABLE_ENERGY_CLEANTECH, + UTILITIES_GRID_INFRASTRUCTURE, + INDUSTRIAL_IO_T_MONITORING_SYSTEMS, + CONSTRUCTION_HEAVY_EQUIPMENT, + MINING_NATURAL_RESOURCES, + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY, + ENERGY_STORAGE_BATTERY_TECHNOLOGY, + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING, + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE, + MOBILITY_AS_A_SERVICE_MAA_S, + FLEET_MANAGEMENT, + PUBLIC_TRANSIT_URBAN_MOBILITY, + AUTONOMOUS_VEHICLES_ADAS, + AFTERMARKET_PARTS_SERVICES, + TELEMATICS_VEHICLE_CONNECTIVITY, + AVIATION_AEROSPACE_TRANSPORT, + MARITIME_SHIPPING, + FITNESS_WELLNESS, + BEAUTY_PERSONAL_CARE, + HOME_LIVING, + DATING_RELATIONSHIPS, + HOBBIES_CRAFTS_DIY, + OUTDOOR_RECREATIONAL_GEAR, + EVENTS_EXPERIENCES_TICKETING_PLATFORMS, + DESIGNER_LUXURY_APPAREL, + ACCESSORIES_JEWELRY_WATCHES, + FOOTWEAR_LEATHER_GOODS, + BEAUTY_FRAGRANCE_SKINCARE, + FASHION_MARKETPLACES_RETAIL_PLATFORMS, + SUSTAINABLE_ETHICAL_FASHION, + RESALE_VINTAGE_CIRCULAR_FASHION, + FASHION_TECH_VIRTUAL_TRY_ONS, + STREETWEAR_EMERGING_LUXURY, + COUTURE_MADE_TO_MEASURE, + NEWS_PUBLISHING_JOURNALISM, + DIGITAL_MEDIA_CONTENT_PLATFORMS, + BROADCASTING_TV_RADIO, + PODCASTING_AUDIO_MEDIA, + NEWS_AGGREGATORS_CURATION_TOOLS, + INDEPENDENT_CREATOR_LED_MEDIA, + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS, + POLITICAL_INVESTIGATIVE_MEDIA, + TRADE_NICHE_PUBLICATIONS, + MEDIA_MONITORING_ANALYTICS, + PROFESSIONAL_TEAMS_LEAGUES, + SPORTS_MEDIA_BROADCASTING, + SPORTS_BETTING_FANTASY_SPORTS, + FITNESS_ATHLETIC_TRAINING_PLATFORMS, + SPORTSWEAR_EQUIPMENT, + ESPORTS_COMPETITIVE_GAMING, + SPORTS_VENUES_EVENT_MANAGEMENT, + ATHLETE_MANAGEMENT_TALENT_AGENCIES, + SPORTS_TECH_PERFORMANCE_ANALYTICS, + YOUTH_AMATEUR_COLLEGIATE_SPORTS, + REAL_ESTATE_MARKETPLACES, + PROPERTY_MANAGEMENT_SOFTWARE, + RENTAL_PLATFORMS, + MORTGAGE_LENDING_TECH, + REAL_ESTATE_INVESTMENT_PLATFORMS, + LAW_FIRMS_LEGAL_SERVICES, + LEGAL_TECH_AUTOMATION, + REGULATORY_COMPLIANCE, + E_DISCOVERY_LITIGATION_TOOLS, + CONTRACT_MANAGEMENT, + GOVERNANCE_RISK_COMPLIANCE_GRC, + IP_TRADEMARK_MANAGEMENT, + LEGAL_RESEARCH_INTELLIGENCE, + COMPLIANCE_TRAINING_CERTIFICATION, + WHISTLEBLOWER_ETHICS_REPORTING, + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G, + BROADBAND_FIBER_INTERNET, + SATELLITE_SPACE_BASED_COMMUNICATIONS, + NETWORK_EQUIPMENT_INFRASTRUCTURE, + TELECOM_BILLING_OSS_BSS_SYSTEMS, + VO_IP_UNIFIED_COMMUNICATIONS, + INTERNET_SERVICE_PROVIDERS_IS_PS, + EDGE_COMPUTING_NETWORK_VIRTUALIZATION, + IO_T_CONNECTIVITY_PLATFORMS, + PRECISION_AGRICULTURE_AG_TECH, + CROP_LIVESTOCK_PRODUCTION, + FOOD_BEVERAGE_MANUFACTURING_PROCESSING, + FOOD_DISTRIBUTION, + RESTAURANTS_FOOD_SERVICE, + AGRICULTURAL_INPUTS_EQUIPMENT, + SUSTAINABLE_REGENERATIVE_AGRICULTURE, + SEAFOOD_AQUACULTURE, + MANAGEMENT_CONSULTING, + MARKETING_ADVERTISING_AGENCIES, + DESIGN_BRANDING_CREATIVE_STUDIOS, + IT_SERVICES_MANAGED_SERVICES, + STAFFING_RECRUITING_TALENT, + ACCOUNTING_TAX_FIRMS, + PUBLIC_RELATIONS_COMMUNICATIONS, + BUSINESS_PROCESS_OUTSOURCING_BPO, + PROFESSIONAL_TRAINING_COACHING, + SPECIALTY_CHEMICALS, + COMMODITY_PETROCHEMICALS, + POLYMERS_PLASTICS_RUBBER, + COATINGS_ADHESIVES_SEALANTS, + INDUSTRIAL_GASES, + ADVANCED_MATERIALS_COMPOSITES, + BATTERY_MATERIALS_ENERGY_STORAGE, + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS, + AGROCHEMICALS_FERTILIZERS, + FREIGHT_TRANSPORTATION_TECH, + LAST_MILE_DELIVERY, + WAREHOUSE_AUTOMATION, + SUPPLY_CHAIN_VISIBILITY_PLATFORMS, + LOGISTICS_MARKETPLACES, + SHIPPING_FREIGHT_FORWARDING, + COLD_CHAIN_LOGISTICS, + REVERSE_LOGISTICS_RETURNS, + CROSS_BORDER_TRADE_TECH, + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS, + HOTELS_ACCOMMODATION, + VACATION_RENTALS_SHORT_TERM_STAYS, + RESTAURANT_TECH_MANAGEMENT, + TRAVEL_BOOKING_PLATFORMS, + TOURISM_EXPERIENCES_ACTIVITIES, + CRUISE_LINES_MARINE_TOURISM, + HOSPITALITY_MANAGEMENT_SYSTEMS, + EVENT_VENUE_MANAGEMENT, + CORPORATE_TRAVEL_MANAGEMENT, + TRAVEL_INSURANCE_PROTECTION, + CONSTRUCTION_MANAGEMENT_SOFTWARE, + BIM_CAD_DESIGN_TOOLS, + CONSTRUCTION_MARKETPLACES, + EQUIPMENT_RENTAL_MANAGEMENT, + BUILDING_MATERIALS_PROCUREMENT, + CONSTRUCTION_WORKFORCE_MANAGEMENT, + PROJECT_ESTIMATION_BIDDING, + MODULAR_PREFAB_CONSTRUCTION, + CONSTRUCTION_SAFETY_COMPLIANCE, + SMART_BUILDING_TECHNOLOGY, + FOOD_BEVERAGE_CPG, + HOME_PERSONAL_CARE_CPG, + CPG_ANALYTICS_INSIGHTS, + DIRECT_TO_CONSUMER_CPG_BRANDS, + CPG_SUPPLY_CHAIN_DISTRIBUTION, + PRIVATE_LABEL_MANUFACTURING, + CPG_RETAIL_INTELLIGENCE, + SUSTAINABLE_CPG_PACKAGING, + BEAUTY_COSMETICS_CPG, + HEALTH_WELLNESS_CPG, + /** + * An enum member indicating that [Subindustry] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or + * if you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + DEFENSE_SYSTEMS_MILITARY_HARDWARE -> + Value.DEFENSE_SYSTEMS_MILITARY_HARDWARE + AEROSPACE_MANUFACTURING -> Value.AEROSPACE_MANUFACTURING + AVIONICS_NAVIGATION_TECHNOLOGY -> Value.AVIONICS_NAVIGATION_TECHNOLOGY + SUBSEA_NAVAL_DEFENSE_SYSTEMS -> Value.SUBSEA_NAVAL_DEFENSE_SYSTEMS + SPACE_SATELLITE_TECHNOLOGY -> Value.SPACE_SATELLITE_TECHNOLOGY + DEFENSE_IT_SYSTEMS_INTEGRATION -> Value.DEFENSE_IT_SYSTEMS_INTEGRATION + SOFTWARE_B2_B -> Value.SOFTWARE_B2_B + SOFTWARE_B2_C -> Value.SOFTWARE_B2_C + CLOUD_INFRASTRUCTURE_DEV_OPS -> Value.CLOUD_INFRASTRUCTURE_DEV_OPS + CYBERSECURITY -> Value.CYBERSECURITY + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING -> + Value.ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING + DATA_INFRASTRUCTURE_ANALYTICS -> Value.DATA_INFRASTRUCTURE_ANALYTICS + HARDWARE_SEMICONDUCTORS -> Value.HARDWARE_SEMICONDUCTORS + FINTECH_INFRASTRUCTURE -> Value.FINTECH_INFRASTRUCTURE + E_COMMERCE_MARKETPLACE_PLATFORMS -> + Value.E_COMMERCE_MARKETPLACE_PLATFORMS + DEVELOPER_TOOLS_APIS -> Value.DEVELOPER_TOOLS_APIS + WEB3_BLOCKCHAIN -> Value.WEB3_BLOCKCHAIN + XR_SPATIAL_COMPUTING -> Value.XR_SPATIAL_COMPUTING + BANKING_LENDING -> Value.BANKING_LENDING + INVESTMENT_MANAGEMENT_WEALTH_TECH -> + Value.INVESTMENT_MANAGEMENT_WEALTH_TECH + INSURANCE_INSUR_TECH -> Value.INSURANCE_INSUR_TECH + PAYMENTS_MONEY_MOVEMENT -> Value.PAYMENTS_MONEY_MOVEMENT + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS -> + Value.ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS + CAPITAL_MARKETS_TRADING_PLATFORMS -> + Value.CAPITAL_MARKETS_TRADING_PLATFORMS + FINANCIAL_INFRASTRUCTURE_APIS -> Value.FINANCIAL_INFRASTRUCTURE_APIS + CREDIT_SCORING_RISK_MANAGEMENT -> Value.CREDIT_SCORING_RISK_MANAGEMENT + CRYPTOCURRENCY_DIGITAL_ASSETS -> Value.CRYPTOCURRENCY_DIGITAL_ASSETS + BNPL_ALTERNATIVE_FINANCING -> Value.BNPL_ALTERNATIVE_FINANCING + HEALTHCARE_PROVIDERS_SERVICES -> Value.HEALTHCARE_PROVIDERS_SERVICES + PHARMACEUTICALS_DRUG_DEVELOPMENT -> + Value.PHARMACEUTICALS_DRUG_DEVELOPMENT + MEDICAL_DEVICES_DIAGNOSTICS -> Value.MEDICAL_DEVICES_DIAGNOSTICS + BIOTECHNOLOGY_GENOMICS -> Value.BIOTECHNOLOGY_GENOMICS + DIGITAL_HEALTH_TELEMEDICINE -> Value.DIGITAL_HEALTH_TELEMEDICINE + HEALTH_INSURANCE_BENEFITS_TECH -> Value.HEALTH_INSURANCE_BENEFITS_TECH + CLINICAL_TRIALS_RESEARCH_PLATFORMS -> + Value.CLINICAL_TRIALS_RESEARCH_PLATFORMS + MENTAL_HEALTH_WELLNESS -> Value.MENTAL_HEALTH_WELLNESS + HEALTHCARE_IT_EHR_SYSTEMS -> Value.HEALTHCARE_IT_EHR_SYSTEMS + CONSUMER_HEALTH_WELLNESS_PRODUCTS -> + Value.CONSUMER_HEALTH_WELLNESS_PRODUCTS + ONLINE_MARKETPLACES -> Value.ONLINE_MARKETPLACES + DIRECT_TO_CONSUMER_DTC_BRANDS -> Value.DIRECT_TO_CONSUMER_DTC_BRANDS + RETAIL_TECH_POINT_OF_SALE_SYSTEMS -> + Value.RETAIL_TECH_POINT_OF_SALE_SYSTEMS + OMNICHANNEL_IN_STORE_RETAIL -> Value.OMNICHANNEL_IN_STORE_RETAIL + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE -> + Value.E_COMMERCE_ENABLEMENT_INFRASTRUCTURE + SUBSCRIPTION_MEMBERSHIP_COMMERCE -> + Value.SUBSCRIPTION_MEMBERSHIP_COMMERCE + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS -> + Value.SOCIAL_COMMERCE_INFLUENCER_PLATFORMS + FASHION_APPAREL_RETAIL -> Value.FASHION_APPAREL_RETAIL + FOOD_BEVERAGE_GROCERY_E_COMMERCE -> + Value.FOOD_BEVERAGE_GROCERY_E_COMMERCE + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO -> + Value.STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO + GAMING_INTERACTIVE_ENTERTAINMENT -> + Value.GAMING_INTERACTIVE_ENTERTAINMENT + CREATOR_ECONOMY_INFLUENCER_PLATFORMS -> + Value.CREATOR_ECONOMY_INFLUENCER_PLATFORMS + ADVERTISING_ADTECH_MEDIA_BUYING -> Value.ADVERTISING_ADTECH_MEDIA_BUYING + FILM_TV_PRODUCTION_STUDIOS -> Value.FILM_TV_PRODUCTION_STUDIOS + EVENTS_VENUES_LIVE_ENTERTAINMENT -> + Value.EVENTS_VENUES_LIVE_ENTERTAINMENT + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES -> + Value.VIRTUAL_WORLDS_METAVERSE_EXPERIENCES + K_12_EDUCATION_PLATFORMS_TOOLS -> Value.K_12_EDUCATION_PLATFORMS_TOOLS + HIGHER_EDUCATION_UNIVERSITY_TECH -> + Value.HIGHER_EDUCATION_UNIVERSITY_TECH + ONLINE_LEARNING_MOO_CS -> Value.ONLINE_LEARNING_MOO_CS + TEST_PREP_CERTIFICATION -> Value.TEST_PREP_CERTIFICATION + CORPORATE_TRAINING_UPSKILLING -> Value.CORPORATE_TRAINING_UPSKILLING + TUTORING_SUPPLEMENTAL_LEARNING -> Value.TUTORING_SUPPLEMENTAL_LEARNING + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS -> + Value.EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS + LANGUAGE_LEARNING -> Value.LANGUAGE_LEARNING + CREATOR_LED_COHORT_BASED_COURSES -> + Value.CREATOR_LED_COHORT_BASED_COURSES + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS -> + Value.SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES -> + Value.GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES + CIVIC_ENGAGEMENT_POLICY_PLATFORMS -> + Value.CIVIC_ENGAGEMENT_POLICY_PLATFORMS + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID -> + Value.INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID + PHILANTHROPY_GRANTMAKING -> Value.PHILANTHROPY_GRANTMAKING + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS -> + Value.NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS + PUBLIC_HEALTH_SOCIAL_SERVICES -> Value.PUBLIC_HEALTH_SOCIAL_SERVICES + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS -> + Value.EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS -> + Value.ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY -> + Value.LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY + MUNICIPAL_INFRASTRUCTURE_SERVICES -> + Value.MUNICIPAL_INFRASTRUCTURE_SERVICES + MANUFACTURING_INDUSTRIAL_AUTOMATION -> + Value.MANUFACTURING_INDUSTRIAL_AUTOMATION + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR -> + Value.ENERGY_PRODUCTION_OIL_GAS_NUCLEAR + RENEWABLE_ENERGY_CLEANTECH -> Value.RENEWABLE_ENERGY_CLEANTECH + UTILITIES_GRID_INFRASTRUCTURE -> Value.UTILITIES_GRID_INFRASTRUCTURE + INDUSTRIAL_IO_T_MONITORING_SYSTEMS -> + Value.INDUSTRIAL_IO_T_MONITORING_SYSTEMS + CONSTRUCTION_HEAVY_EQUIPMENT -> Value.CONSTRUCTION_HEAVY_EQUIPMENT + MINING_NATURAL_RESOURCES -> Value.MINING_NATURAL_RESOURCES + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY -> + Value.ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY + ENERGY_STORAGE_BATTERY_TECHNOLOGY -> + Value.ENERGY_STORAGE_BATTERY_TECHNOLOGY + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING -> + Value.AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE -> + Value.ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE + MOBILITY_AS_A_SERVICE_MAA_S -> Value.MOBILITY_AS_A_SERVICE_MAA_S + FLEET_MANAGEMENT -> Value.FLEET_MANAGEMENT + PUBLIC_TRANSIT_URBAN_MOBILITY -> Value.PUBLIC_TRANSIT_URBAN_MOBILITY + AUTONOMOUS_VEHICLES_ADAS -> Value.AUTONOMOUS_VEHICLES_ADAS + AFTERMARKET_PARTS_SERVICES -> Value.AFTERMARKET_PARTS_SERVICES + TELEMATICS_VEHICLE_CONNECTIVITY -> Value.TELEMATICS_VEHICLE_CONNECTIVITY + AVIATION_AEROSPACE_TRANSPORT -> Value.AVIATION_AEROSPACE_TRANSPORT + MARITIME_SHIPPING -> Value.MARITIME_SHIPPING + FITNESS_WELLNESS -> Value.FITNESS_WELLNESS + BEAUTY_PERSONAL_CARE -> Value.BEAUTY_PERSONAL_CARE + HOME_LIVING -> Value.HOME_LIVING + DATING_RELATIONSHIPS -> Value.DATING_RELATIONSHIPS + HOBBIES_CRAFTS_DIY -> Value.HOBBIES_CRAFTS_DIY + OUTDOOR_RECREATIONAL_GEAR -> Value.OUTDOOR_RECREATIONAL_GEAR + EVENTS_EXPERIENCES_TICKETING_PLATFORMS -> + Value.EVENTS_EXPERIENCES_TICKETING_PLATFORMS + DESIGNER_LUXURY_APPAREL -> Value.DESIGNER_LUXURY_APPAREL + ACCESSORIES_JEWELRY_WATCHES -> Value.ACCESSORIES_JEWELRY_WATCHES + FOOTWEAR_LEATHER_GOODS -> Value.FOOTWEAR_LEATHER_GOODS + BEAUTY_FRAGRANCE_SKINCARE -> Value.BEAUTY_FRAGRANCE_SKINCARE + FASHION_MARKETPLACES_RETAIL_PLATFORMS -> + Value.FASHION_MARKETPLACES_RETAIL_PLATFORMS + SUSTAINABLE_ETHICAL_FASHION -> Value.SUSTAINABLE_ETHICAL_FASHION + RESALE_VINTAGE_CIRCULAR_FASHION -> Value.RESALE_VINTAGE_CIRCULAR_FASHION + FASHION_TECH_VIRTUAL_TRY_ONS -> Value.FASHION_TECH_VIRTUAL_TRY_ONS + STREETWEAR_EMERGING_LUXURY -> Value.STREETWEAR_EMERGING_LUXURY + COUTURE_MADE_TO_MEASURE -> Value.COUTURE_MADE_TO_MEASURE + NEWS_PUBLISHING_JOURNALISM -> Value.NEWS_PUBLISHING_JOURNALISM + DIGITAL_MEDIA_CONTENT_PLATFORMS -> Value.DIGITAL_MEDIA_CONTENT_PLATFORMS + BROADCASTING_TV_RADIO -> Value.BROADCASTING_TV_RADIO + PODCASTING_AUDIO_MEDIA -> Value.PODCASTING_AUDIO_MEDIA + NEWS_AGGREGATORS_CURATION_TOOLS -> Value.NEWS_AGGREGATORS_CURATION_TOOLS + INDEPENDENT_CREATOR_LED_MEDIA -> Value.INDEPENDENT_CREATOR_LED_MEDIA + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS -> + Value.NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS + POLITICAL_INVESTIGATIVE_MEDIA -> Value.POLITICAL_INVESTIGATIVE_MEDIA + TRADE_NICHE_PUBLICATIONS -> Value.TRADE_NICHE_PUBLICATIONS + MEDIA_MONITORING_ANALYTICS -> Value.MEDIA_MONITORING_ANALYTICS + PROFESSIONAL_TEAMS_LEAGUES -> Value.PROFESSIONAL_TEAMS_LEAGUES + SPORTS_MEDIA_BROADCASTING -> Value.SPORTS_MEDIA_BROADCASTING + SPORTS_BETTING_FANTASY_SPORTS -> Value.SPORTS_BETTING_FANTASY_SPORTS + FITNESS_ATHLETIC_TRAINING_PLATFORMS -> + Value.FITNESS_ATHLETIC_TRAINING_PLATFORMS + SPORTSWEAR_EQUIPMENT -> Value.SPORTSWEAR_EQUIPMENT + ESPORTS_COMPETITIVE_GAMING -> Value.ESPORTS_COMPETITIVE_GAMING + SPORTS_VENUES_EVENT_MANAGEMENT -> Value.SPORTS_VENUES_EVENT_MANAGEMENT + ATHLETE_MANAGEMENT_TALENT_AGENCIES -> + Value.ATHLETE_MANAGEMENT_TALENT_AGENCIES + SPORTS_TECH_PERFORMANCE_ANALYTICS -> + Value.SPORTS_TECH_PERFORMANCE_ANALYTICS + YOUTH_AMATEUR_COLLEGIATE_SPORTS -> Value.YOUTH_AMATEUR_COLLEGIATE_SPORTS + REAL_ESTATE_MARKETPLACES -> Value.REAL_ESTATE_MARKETPLACES + PROPERTY_MANAGEMENT_SOFTWARE -> Value.PROPERTY_MANAGEMENT_SOFTWARE + RENTAL_PLATFORMS -> Value.RENTAL_PLATFORMS + MORTGAGE_LENDING_TECH -> Value.MORTGAGE_LENDING_TECH + REAL_ESTATE_INVESTMENT_PLATFORMS -> + Value.REAL_ESTATE_INVESTMENT_PLATFORMS + LAW_FIRMS_LEGAL_SERVICES -> Value.LAW_FIRMS_LEGAL_SERVICES + LEGAL_TECH_AUTOMATION -> Value.LEGAL_TECH_AUTOMATION + REGULATORY_COMPLIANCE -> Value.REGULATORY_COMPLIANCE + E_DISCOVERY_LITIGATION_TOOLS -> Value.E_DISCOVERY_LITIGATION_TOOLS + CONTRACT_MANAGEMENT -> Value.CONTRACT_MANAGEMENT + GOVERNANCE_RISK_COMPLIANCE_GRC -> Value.GOVERNANCE_RISK_COMPLIANCE_GRC + IP_TRADEMARK_MANAGEMENT -> Value.IP_TRADEMARK_MANAGEMENT + LEGAL_RESEARCH_INTELLIGENCE -> Value.LEGAL_RESEARCH_INTELLIGENCE + COMPLIANCE_TRAINING_CERTIFICATION -> + Value.COMPLIANCE_TRAINING_CERTIFICATION + WHISTLEBLOWER_ETHICS_REPORTING -> Value.WHISTLEBLOWER_ETHICS_REPORTING + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G -> + Value.MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G + BROADBAND_FIBER_INTERNET -> Value.BROADBAND_FIBER_INTERNET + SATELLITE_SPACE_BASED_COMMUNICATIONS -> + Value.SATELLITE_SPACE_BASED_COMMUNICATIONS + NETWORK_EQUIPMENT_INFRASTRUCTURE -> + Value.NETWORK_EQUIPMENT_INFRASTRUCTURE + TELECOM_BILLING_OSS_BSS_SYSTEMS -> Value.TELECOM_BILLING_OSS_BSS_SYSTEMS + VO_IP_UNIFIED_COMMUNICATIONS -> Value.VO_IP_UNIFIED_COMMUNICATIONS + INTERNET_SERVICE_PROVIDERS_IS_PS -> + Value.INTERNET_SERVICE_PROVIDERS_IS_PS + EDGE_COMPUTING_NETWORK_VIRTUALIZATION -> + Value.EDGE_COMPUTING_NETWORK_VIRTUALIZATION + IO_T_CONNECTIVITY_PLATFORMS -> Value.IO_T_CONNECTIVITY_PLATFORMS + PRECISION_AGRICULTURE_AG_TECH -> Value.PRECISION_AGRICULTURE_AG_TECH + CROP_LIVESTOCK_PRODUCTION -> Value.CROP_LIVESTOCK_PRODUCTION + FOOD_BEVERAGE_MANUFACTURING_PROCESSING -> + Value.FOOD_BEVERAGE_MANUFACTURING_PROCESSING + FOOD_DISTRIBUTION -> Value.FOOD_DISTRIBUTION + RESTAURANTS_FOOD_SERVICE -> Value.RESTAURANTS_FOOD_SERVICE + AGRICULTURAL_INPUTS_EQUIPMENT -> Value.AGRICULTURAL_INPUTS_EQUIPMENT + SUSTAINABLE_REGENERATIVE_AGRICULTURE -> + Value.SUSTAINABLE_REGENERATIVE_AGRICULTURE + SEAFOOD_AQUACULTURE -> Value.SEAFOOD_AQUACULTURE + MANAGEMENT_CONSULTING -> Value.MANAGEMENT_CONSULTING + MARKETING_ADVERTISING_AGENCIES -> Value.MARKETING_ADVERTISING_AGENCIES + DESIGN_BRANDING_CREATIVE_STUDIOS -> + Value.DESIGN_BRANDING_CREATIVE_STUDIOS + IT_SERVICES_MANAGED_SERVICES -> Value.IT_SERVICES_MANAGED_SERVICES + STAFFING_RECRUITING_TALENT -> Value.STAFFING_RECRUITING_TALENT + ACCOUNTING_TAX_FIRMS -> Value.ACCOUNTING_TAX_FIRMS + PUBLIC_RELATIONS_COMMUNICATIONS -> Value.PUBLIC_RELATIONS_COMMUNICATIONS + BUSINESS_PROCESS_OUTSOURCING_BPO -> + Value.BUSINESS_PROCESS_OUTSOURCING_BPO + PROFESSIONAL_TRAINING_COACHING -> Value.PROFESSIONAL_TRAINING_COACHING + SPECIALTY_CHEMICALS -> Value.SPECIALTY_CHEMICALS + COMMODITY_PETROCHEMICALS -> Value.COMMODITY_PETROCHEMICALS + POLYMERS_PLASTICS_RUBBER -> Value.POLYMERS_PLASTICS_RUBBER + COATINGS_ADHESIVES_SEALANTS -> Value.COATINGS_ADHESIVES_SEALANTS + INDUSTRIAL_GASES -> Value.INDUSTRIAL_GASES + ADVANCED_MATERIALS_COMPOSITES -> Value.ADVANCED_MATERIALS_COMPOSITES + BATTERY_MATERIALS_ENERGY_STORAGE -> + Value.BATTERY_MATERIALS_ENERGY_STORAGE + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS -> + Value.ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS + AGROCHEMICALS_FERTILIZERS -> Value.AGROCHEMICALS_FERTILIZERS + FREIGHT_TRANSPORTATION_TECH -> Value.FREIGHT_TRANSPORTATION_TECH + LAST_MILE_DELIVERY -> Value.LAST_MILE_DELIVERY + WAREHOUSE_AUTOMATION -> Value.WAREHOUSE_AUTOMATION + SUPPLY_CHAIN_VISIBILITY_PLATFORMS -> + Value.SUPPLY_CHAIN_VISIBILITY_PLATFORMS + LOGISTICS_MARKETPLACES -> Value.LOGISTICS_MARKETPLACES + SHIPPING_FREIGHT_FORWARDING -> Value.SHIPPING_FREIGHT_FORWARDING + COLD_CHAIN_LOGISTICS -> Value.COLD_CHAIN_LOGISTICS + REVERSE_LOGISTICS_RETURNS -> Value.REVERSE_LOGISTICS_RETURNS + CROSS_BORDER_TRADE_TECH -> Value.CROSS_BORDER_TRADE_TECH + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS -> + Value.TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS + HOTELS_ACCOMMODATION -> Value.HOTELS_ACCOMMODATION + VACATION_RENTALS_SHORT_TERM_STAYS -> + Value.VACATION_RENTALS_SHORT_TERM_STAYS + RESTAURANT_TECH_MANAGEMENT -> Value.RESTAURANT_TECH_MANAGEMENT + TRAVEL_BOOKING_PLATFORMS -> Value.TRAVEL_BOOKING_PLATFORMS + TOURISM_EXPERIENCES_ACTIVITIES -> Value.TOURISM_EXPERIENCES_ACTIVITIES + CRUISE_LINES_MARINE_TOURISM -> Value.CRUISE_LINES_MARINE_TOURISM + HOSPITALITY_MANAGEMENT_SYSTEMS -> Value.HOSPITALITY_MANAGEMENT_SYSTEMS + EVENT_VENUE_MANAGEMENT -> Value.EVENT_VENUE_MANAGEMENT + CORPORATE_TRAVEL_MANAGEMENT -> Value.CORPORATE_TRAVEL_MANAGEMENT + TRAVEL_INSURANCE_PROTECTION -> Value.TRAVEL_INSURANCE_PROTECTION + CONSTRUCTION_MANAGEMENT_SOFTWARE -> + Value.CONSTRUCTION_MANAGEMENT_SOFTWARE + BIM_CAD_DESIGN_TOOLS -> Value.BIM_CAD_DESIGN_TOOLS + CONSTRUCTION_MARKETPLACES -> Value.CONSTRUCTION_MARKETPLACES + EQUIPMENT_RENTAL_MANAGEMENT -> Value.EQUIPMENT_RENTAL_MANAGEMENT + BUILDING_MATERIALS_PROCUREMENT -> Value.BUILDING_MATERIALS_PROCUREMENT + CONSTRUCTION_WORKFORCE_MANAGEMENT -> + Value.CONSTRUCTION_WORKFORCE_MANAGEMENT + PROJECT_ESTIMATION_BIDDING -> Value.PROJECT_ESTIMATION_BIDDING + MODULAR_PREFAB_CONSTRUCTION -> Value.MODULAR_PREFAB_CONSTRUCTION + CONSTRUCTION_SAFETY_COMPLIANCE -> Value.CONSTRUCTION_SAFETY_COMPLIANCE + SMART_BUILDING_TECHNOLOGY -> Value.SMART_BUILDING_TECHNOLOGY + FOOD_BEVERAGE_CPG -> Value.FOOD_BEVERAGE_CPG + HOME_PERSONAL_CARE_CPG -> Value.HOME_PERSONAL_CARE_CPG + CPG_ANALYTICS_INSIGHTS -> Value.CPG_ANALYTICS_INSIGHTS + DIRECT_TO_CONSUMER_CPG_BRANDS -> Value.DIRECT_TO_CONSUMER_CPG_BRANDS + CPG_SUPPLY_CHAIN_DISTRIBUTION -> Value.CPG_SUPPLY_CHAIN_DISTRIBUTION + PRIVATE_LABEL_MANUFACTURING -> Value.PRIVATE_LABEL_MANUFACTURING + CPG_RETAIL_INTELLIGENCE -> Value.CPG_RETAIL_INTELLIGENCE + SUSTAINABLE_CPG_PACKAGING -> Value.SUSTAINABLE_CPG_PACKAGING + BEAUTY_COSMETICS_CPG -> Value.BEAUTY_COSMETICS_CPG + HEALTH_WELLNESS_CPG -> Value.HEALTH_WELLNESS_CPG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known + * and don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not + * a known member. + */ + fun known(): Known = + when (this) { + DEFENSE_SYSTEMS_MILITARY_HARDWARE -> + Known.DEFENSE_SYSTEMS_MILITARY_HARDWARE + AEROSPACE_MANUFACTURING -> Known.AEROSPACE_MANUFACTURING + AVIONICS_NAVIGATION_TECHNOLOGY -> Known.AVIONICS_NAVIGATION_TECHNOLOGY + SUBSEA_NAVAL_DEFENSE_SYSTEMS -> Known.SUBSEA_NAVAL_DEFENSE_SYSTEMS + SPACE_SATELLITE_TECHNOLOGY -> Known.SPACE_SATELLITE_TECHNOLOGY + DEFENSE_IT_SYSTEMS_INTEGRATION -> Known.DEFENSE_IT_SYSTEMS_INTEGRATION + SOFTWARE_B2_B -> Known.SOFTWARE_B2_B + SOFTWARE_B2_C -> Known.SOFTWARE_B2_C + CLOUD_INFRASTRUCTURE_DEV_OPS -> Known.CLOUD_INFRASTRUCTURE_DEV_OPS + CYBERSECURITY -> Known.CYBERSECURITY + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING -> + Known.ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING + DATA_INFRASTRUCTURE_ANALYTICS -> Known.DATA_INFRASTRUCTURE_ANALYTICS + HARDWARE_SEMICONDUCTORS -> Known.HARDWARE_SEMICONDUCTORS + FINTECH_INFRASTRUCTURE -> Known.FINTECH_INFRASTRUCTURE + E_COMMERCE_MARKETPLACE_PLATFORMS -> + Known.E_COMMERCE_MARKETPLACE_PLATFORMS + DEVELOPER_TOOLS_APIS -> Known.DEVELOPER_TOOLS_APIS + WEB3_BLOCKCHAIN -> Known.WEB3_BLOCKCHAIN + XR_SPATIAL_COMPUTING -> Known.XR_SPATIAL_COMPUTING + BANKING_LENDING -> Known.BANKING_LENDING + INVESTMENT_MANAGEMENT_WEALTH_TECH -> + Known.INVESTMENT_MANAGEMENT_WEALTH_TECH + INSURANCE_INSUR_TECH -> Known.INSURANCE_INSUR_TECH + PAYMENTS_MONEY_MOVEMENT -> Known.PAYMENTS_MONEY_MOVEMENT + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS -> + Known.ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS + CAPITAL_MARKETS_TRADING_PLATFORMS -> + Known.CAPITAL_MARKETS_TRADING_PLATFORMS + FINANCIAL_INFRASTRUCTURE_APIS -> Known.FINANCIAL_INFRASTRUCTURE_APIS + CREDIT_SCORING_RISK_MANAGEMENT -> Known.CREDIT_SCORING_RISK_MANAGEMENT + CRYPTOCURRENCY_DIGITAL_ASSETS -> Known.CRYPTOCURRENCY_DIGITAL_ASSETS + BNPL_ALTERNATIVE_FINANCING -> Known.BNPL_ALTERNATIVE_FINANCING + HEALTHCARE_PROVIDERS_SERVICES -> Known.HEALTHCARE_PROVIDERS_SERVICES + PHARMACEUTICALS_DRUG_DEVELOPMENT -> + Known.PHARMACEUTICALS_DRUG_DEVELOPMENT + MEDICAL_DEVICES_DIAGNOSTICS -> Known.MEDICAL_DEVICES_DIAGNOSTICS + BIOTECHNOLOGY_GENOMICS -> Known.BIOTECHNOLOGY_GENOMICS + DIGITAL_HEALTH_TELEMEDICINE -> Known.DIGITAL_HEALTH_TELEMEDICINE + HEALTH_INSURANCE_BENEFITS_TECH -> Known.HEALTH_INSURANCE_BENEFITS_TECH + CLINICAL_TRIALS_RESEARCH_PLATFORMS -> + Known.CLINICAL_TRIALS_RESEARCH_PLATFORMS + MENTAL_HEALTH_WELLNESS -> Known.MENTAL_HEALTH_WELLNESS + HEALTHCARE_IT_EHR_SYSTEMS -> Known.HEALTHCARE_IT_EHR_SYSTEMS + CONSUMER_HEALTH_WELLNESS_PRODUCTS -> + Known.CONSUMER_HEALTH_WELLNESS_PRODUCTS + ONLINE_MARKETPLACES -> Known.ONLINE_MARKETPLACES + DIRECT_TO_CONSUMER_DTC_BRANDS -> Known.DIRECT_TO_CONSUMER_DTC_BRANDS + RETAIL_TECH_POINT_OF_SALE_SYSTEMS -> + Known.RETAIL_TECH_POINT_OF_SALE_SYSTEMS + OMNICHANNEL_IN_STORE_RETAIL -> Known.OMNICHANNEL_IN_STORE_RETAIL + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE -> + Known.E_COMMERCE_ENABLEMENT_INFRASTRUCTURE + SUBSCRIPTION_MEMBERSHIP_COMMERCE -> + Known.SUBSCRIPTION_MEMBERSHIP_COMMERCE + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS -> + Known.SOCIAL_COMMERCE_INFLUENCER_PLATFORMS + FASHION_APPAREL_RETAIL -> Known.FASHION_APPAREL_RETAIL + FOOD_BEVERAGE_GROCERY_E_COMMERCE -> + Known.FOOD_BEVERAGE_GROCERY_E_COMMERCE + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO -> + Known.STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO + GAMING_INTERACTIVE_ENTERTAINMENT -> + Known.GAMING_INTERACTIVE_ENTERTAINMENT + CREATOR_ECONOMY_INFLUENCER_PLATFORMS -> + Known.CREATOR_ECONOMY_INFLUENCER_PLATFORMS + ADVERTISING_ADTECH_MEDIA_BUYING -> Known.ADVERTISING_ADTECH_MEDIA_BUYING + FILM_TV_PRODUCTION_STUDIOS -> Known.FILM_TV_PRODUCTION_STUDIOS + EVENTS_VENUES_LIVE_ENTERTAINMENT -> + Known.EVENTS_VENUES_LIVE_ENTERTAINMENT + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES -> + Known.VIRTUAL_WORLDS_METAVERSE_EXPERIENCES + K_12_EDUCATION_PLATFORMS_TOOLS -> Known.K_12_EDUCATION_PLATFORMS_TOOLS + HIGHER_EDUCATION_UNIVERSITY_TECH -> + Known.HIGHER_EDUCATION_UNIVERSITY_TECH + ONLINE_LEARNING_MOO_CS -> Known.ONLINE_LEARNING_MOO_CS + TEST_PREP_CERTIFICATION -> Known.TEST_PREP_CERTIFICATION + CORPORATE_TRAINING_UPSKILLING -> Known.CORPORATE_TRAINING_UPSKILLING + TUTORING_SUPPLEMENTAL_LEARNING -> Known.TUTORING_SUPPLEMENTAL_LEARNING + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS -> + Known.EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS + LANGUAGE_LEARNING -> Known.LANGUAGE_LEARNING + CREATOR_LED_COHORT_BASED_COURSES -> + Known.CREATOR_LED_COHORT_BASED_COURSES + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS -> + Known.SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES -> + Known.GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES + CIVIC_ENGAGEMENT_POLICY_PLATFORMS -> + Known.CIVIC_ENGAGEMENT_POLICY_PLATFORMS + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID -> + Known.INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID + PHILANTHROPY_GRANTMAKING -> Known.PHILANTHROPY_GRANTMAKING + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS -> + Known.NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS + PUBLIC_HEALTH_SOCIAL_SERVICES -> Known.PUBLIC_HEALTH_SOCIAL_SERVICES + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS -> + Known.EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS -> + Known.ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY -> + Known.LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY + MUNICIPAL_INFRASTRUCTURE_SERVICES -> + Known.MUNICIPAL_INFRASTRUCTURE_SERVICES + MANUFACTURING_INDUSTRIAL_AUTOMATION -> + Known.MANUFACTURING_INDUSTRIAL_AUTOMATION + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR -> + Known.ENERGY_PRODUCTION_OIL_GAS_NUCLEAR + RENEWABLE_ENERGY_CLEANTECH -> Known.RENEWABLE_ENERGY_CLEANTECH + UTILITIES_GRID_INFRASTRUCTURE -> Known.UTILITIES_GRID_INFRASTRUCTURE + INDUSTRIAL_IO_T_MONITORING_SYSTEMS -> + Known.INDUSTRIAL_IO_T_MONITORING_SYSTEMS + CONSTRUCTION_HEAVY_EQUIPMENT -> Known.CONSTRUCTION_HEAVY_EQUIPMENT + MINING_NATURAL_RESOURCES -> Known.MINING_NATURAL_RESOURCES + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY -> + Known.ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY + ENERGY_STORAGE_BATTERY_TECHNOLOGY -> + Known.ENERGY_STORAGE_BATTERY_TECHNOLOGY + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING -> + Known.AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE -> + Known.ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE + MOBILITY_AS_A_SERVICE_MAA_S -> Known.MOBILITY_AS_A_SERVICE_MAA_S + FLEET_MANAGEMENT -> Known.FLEET_MANAGEMENT + PUBLIC_TRANSIT_URBAN_MOBILITY -> Known.PUBLIC_TRANSIT_URBAN_MOBILITY + AUTONOMOUS_VEHICLES_ADAS -> Known.AUTONOMOUS_VEHICLES_ADAS + AFTERMARKET_PARTS_SERVICES -> Known.AFTERMARKET_PARTS_SERVICES + TELEMATICS_VEHICLE_CONNECTIVITY -> Known.TELEMATICS_VEHICLE_CONNECTIVITY + AVIATION_AEROSPACE_TRANSPORT -> Known.AVIATION_AEROSPACE_TRANSPORT + MARITIME_SHIPPING -> Known.MARITIME_SHIPPING + FITNESS_WELLNESS -> Known.FITNESS_WELLNESS + BEAUTY_PERSONAL_CARE -> Known.BEAUTY_PERSONAL_CARE + HOME_LIVING -> Known.HOME_LIVING + DATING_RELATIONSHIPS -> Known.DATING_RELATIONSHIPS + HOBBIES_CRAFTS_DIY -> Known.HOBBIES_CRAFTS_DIY + OUTDOOR_RECREATIONAL_GEAR -> Known.OUTDOOR_RECREATIONAL_GEAR + EVENTS_EXPERIENCES_TICKETING_PLATFORMS -> + Known.EVENTS_EXPERIENCES_TICKETING_PLATFORMS + DESIGNER_LUXURY_APPAREL -> Known.DESIGNER_LUXURY_APPAREL + ACCESSORIES_JEWELRY_WATCHES -> Known.ACCESSORIES_JEWELRY_WATCHES + FOOTWEAR_LEATHER_GOODS -> Known.FOOTWEAR_LEATHER_GOODS + BEAUTY_FRAGRANCE_SKINCARE -> Known.BEAUTY_FRAGRANCE_SKINCARE + FASHION_MARKETPLACES_RETAIL_PLATFORMS -> + Known.FASHION_MARKETPLACES_RETAIL_PLATFORMS + SUSTAINABLE_ETHICAL_FASHION -> Known.SUSTAINABLE_ETHICAL_FASHION + RESALE_VINTAGE_CIRCULAR_FASHION -> Known.RESALE_VINTAGE_CIRCULAR_FASHION + FASHION_TECH_VIRTUAL_TRY_ONS -> Known.FASHION_TECH_VIRTUAL_TRY_ONS + STREETWEAR_EMERGING_LUXURY -> Known.STREETWEAR_EMERGING_LUXURY + COUTURE_MADE_TO_MEASURE -> Known.COUTURE_MADE_TO_MEASURE + NEWS_PUBLISHING_JOURNALISM -> Known.NEWS_PUBLISHING_JOURNALISM + DIGITAL_MEDIA_CONTENT_PLATFORMS -> Known.DIGITAL_MEDIA_CONTENT_PLATFORMS + BROADCASTING_TV_RADIO -> Known.BROADCASTING_TV_RADIO + PODCASTING_AUDIO_MEDIA -> Known.PODCASTING_AUDIO_MEDIA + NEWS_AGGREGATORS_CURATION_TOOLS -> Known.NEWS_AGGREGATORS_CURATION_TOOLS + INDEPENDENT_CREATOR_LED_MEDIA -> Known.INDEPENDENT_CREATOR_LED_MEDIA + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS -> + Known.NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS + POLITICAL_INVESTIGATIVE_MEDIA -> Known.POLITICAL_INVESTIGATIVE_MEDIA + TRADE_NICHE_PUBLICATIONS -> Known.TRADE_NICHE_PUBLICATIONS + MEDIA_MONITORING_ANALYTICS -> Known.MEDIA_MONITORING_ANALYTICS + PROFESSIONAL_TEAMS_LEAGUES -> Known.PROFESSIONAL_TEAMS_LEAGUES + SPORTS_MEDIA_BROADCASTING -> Known.SPORTS_MEDIA_BROADCASTING + SPORTS_BETTING_FANTASY_SPORTS -> Known.SPORTS_BETTING_FANTASY_SPORTS + FITNESS_ATHLETIC_TRAINING_PLATFORMS -> + Known.FITNESS_ATHLETIC_TRAINING_PLATFORMS + SPORTSWEAR_EQUIPMENT -> Known.SPORTSWEAR_EQUIPMENT + ESPORTS_COMPETITIVE_GAMING -> Known.ESPORTS_COMPETITIVE_GAMING + SPORTS_VENUES_EVENT_MANAGEMENT -> Known.SPORTS_VENUES_EVENT_MANAGEMENT + ATHLETE_MANAGEMENT_TALENT_AGENCIES -> + Known.ATHLETE_MANAGEMENT_TALENT_AGENCIES + SPORTS_TECH_PERFORMANCE_ANALYTICS -> + Known.SPORTS_TECH_PERFORMANCE_ANALYTICS + YOUTH_AMATEUR_COLLEGIATE_SPORTS -> Known.YOUTH_AMATEUR_COLLEGIATE_SPORTS + REAL_ESTATE_MARKETPLACES -> Known.REAL_ESTATE_MARKETPLACES + PROPERTY_MANAGEMENT_SOFTWARE -> Known.PROPERTY_MANAGEMENT_SOFTWARE + RENTAL_PLATFORMS -> Known.RENTAL_PLATFORMS + MORTGAGE_LENDING_TECH -> Known.MORTGAGE_LENDING_TECH + REAL_ESTATE_INVESTMENT_PLATFORMS -> + Known.REAL_ESTATE_INVESTMENT_PLATFORMS + LAW_FIRMS_LEGAL_SERVICES -> Known.LAW_FIRMS_LEGAL_SERVICES + LEGAL_TECH_AUTOMATION -> Known.LEGAL_TECH_AUTOMATION + REGULATORY_COMPLIANCE -> Known.REGULATORY_COMPLIANCE + E_DISCOVERY_LITIGATION_TOOLS -> Known.E_DISCOVERY_LITIGATION_TOOLS + CONTRACT_MANAGEMENT -> Known.CONTRACT_MANAGEMENT + GOVERNANCE_RISK_COMPLIANCE_GRC -> Known.GOVERNANCE_RISK_COMPLIANCE_GRC + IP_TRADEMARK_MANAGEMENT -> Known.IP_TRADEMARK_MANAGEMENT + LEGAL_RESEARCH_INTELLIGENCE -> Known.LEGAL_RESEARCH_INTELLIGENCE + COMPLIANCE_TRAINING_CERTIFICATION -> + Known.COMPLIANCE_TRAINING_CERTIFICATION + WHISTLEBLOWER_ETHICS_REPORTING -> Known.WHISTLEBLOWER_ETHICS_REPORTING + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G -> + Known.MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G + BROADBAND_FIBER_INTERNET -> Known.BROADBAND_FIBER_INTERNET + SATELLITE_SPACE_BASED_COMMUNICATIONS -> + Known.SATELLITE_SPACE_BASED_COMMUNICATIONS + NETWORK_EQUIPMENT_INFRASTRUCTURE -> + Known.NETWORK_EQUIPMENT_INFRASTRUCTURE + TELECOM_BILLING_OSS_BSS_SYSTEMS -> Known.TELECOM_BILLING_OSS_BSS_SYSTEMS + VO_IP_UNIFIED_COMMUNICATIONS -> Known.VO_IP_UNIFIED_COMMUNICATIONS + INTERNET_SERVICE_PROVIDERS_IS_PS -> + Known.INTERNET_SERVICE_PROVIDERS_IS_PS + EDGE_COMPUTING_NETWORK_VIRTUALIZATION -> + Known.EDGE_COMPUTING_NETWORK_VIRTUALIZATION + IO_T_CONNECTIVITY_PLATFORMS -> Known.IO_T_CONNECTIVITY_PLATFORMS + PRECISION_AGRICULTURE_AG_TECH -> Known.PRECISION_AGRICULTURE_AG_TECH + CROP_LIVESTOCK_PRODUCTION -> Known.CROP_LIVESTOCK_PRODUCTION + FOOD_BEVERAGE_MANUFACTURING_PROCESSING -> + Known.FOOD_BEVERAGE_MANUFACTURING_PROCESSING + FOOD_DISTRIBUTION -> Known.FOOD_DISTRIBUTION + RESTAURANTS_FOOD_SERVICE -> Known.RESTAURANTS_FOOD_SERVICE + AGRICULTURAL_INPUTS_EQUIPMENT -> Known.AGRICULTURAL_INPUTS_EQUIPMENT + SUSTAINABLE_REGENERATIVE_AGRICULTURE -> + Known.SUSTAINABLE_REGENERATIVE_AGRICULTURE + SEAFOOD_AQUACULTURE -> Known.SEAFOOD_AQUACULTURE + MANAGEMENT_CONSULTING -> Known.MANAGEMENT_CONSULTING + MARKETING_ADVERTISING_AGENCIES -> Known.MARKETING_ADVERTISING_AGENCIES + DESIGN_BRANDING_CREATIVE_STUDIOS -> + Known.DESIGN_BRANDING_CREATIVE_STUDIOS + IT_SERVICES_MANAGED_SERVICES -> Known.IT_SERVICES_MANAGED_SERVICES + STAFFING_RECRUITING_TALENT -> Known.STAFFING_RECRUITING_TALENT + ACCOUNTING_TAX_FIRMS -> Known.ACCOUNTING_TAX_FIRMS + PUBLIC_RELATIONS_COMMUNICATIONS -> Known.PUBLIC_RELATIONS_COMMUNICATIONS + BUSINESS_PROCESS_OUTSOURCING_BPO -> + Known.BUSINESS_PROCESS_OUTSOURCING_BPO + PROFESSIONAL_TRAINING_COACHING -> Known.PROFESSIONAL_TRAINING_COACHING + SPECIALTY_CHEMICALS -> Known.SPECIALTY_CHEMICALS + COMMODITY_PETROCHEMICALS -> Known.COMMODITY_PETROCHEMICALS + POLYMERS_PLASTICS_RUBBER -> Known.POLYMERS_PLASTICS_RUBBER + COATINGS_ADHESIVES_SEALANTS -> Known.COATINGS_ADHESIVES_SEALANTS + INDUSTRIAL_GASES -> Known.INDUSTRIAL_GASES + ADVANCED_MATERIALS_COMPOSITES -> Known.ADVANCED_MATERIALS_COMPOSITES + BATTERY_MATERIALS_ENERGY_STORAGE -> + Known.BATTERY_MATERIALS_ENERGY_STORAGE + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS -> + Known.ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS + AGROCHEMICALS_FERTILIZERS -> Known.AGROCHEMICALS_FERTILIZERS + FREIGHT_TRANSPORTATION_TECH -> Known.FREIGHT_TRANSPORTATION_TECH + LAST_MILE_DELIVERY -> Known.LAST_MILE_DELIVERY + WAREHOUSE_AUTOMATION -> Known.WAREHOUSE_AUTOMATION + SUPPLY_CHAIN_VISIBILITY_PLATFORMS -> + Known.SUPPLY_CHAIN_VISIBILITY_PLATFORMS + LOGISTICS_MARKETPLACES -> Known.LOGISTICS_MARKETPLACES + SHIPPING_FREIGHT_FORWARDING -> Known.SHIPPING_FREIGHT_FORWARDING + COLD_CHAIN_LOGISTICS -> Known.COLD_CHAIN_LOGISTICS + REVERSE_LOGISTICS_RETURNS -> Known.REVERSE_LOGISTICS_RETURNS + CROSS_BORDER_TRADE_TECH -> Known.CROSS_BORDER_TRADE_TECH + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS -> + Known.TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS + HOTELS_ACCOMMODATION -> Known.HOTELS_ACCOMMODATION + VACATION_RENTALS_SHORT_TERM_STAYS -> + Known.VACATION_RENTALS_SHORT_TERM_STAYS + RESTAURANT_TECH_MANAGEMENT -> Known.RESTAURANT_TECH_MANAGEMENT + TRAVEL_BOOKING_PLATFORMS -> Known.TRAVEL_BOOKING_PLATFORMS + TOURISM_EXPERIENCES_ACTIVITIES -> Known.TOURISM_EXPERIENCES_ACTIVITIES + CRUISE_LINES_MARINE_TOURISM -> Known.CRUISE_LINES_MARINE_TOURISM + HOSPITALITY_MANAGEMENT_SYSTEMS -> Known.HOSPITALITY_MANAGEMENT_SYSTEMS + EVENT_VENUE_MANAGEMENT -> Known.EVENT_VENUE_MANAGEMENT + CORPORATE_TRAVEL_MANAGEMENT -> Known.CORPORATE_TRAVEL_MANAGEMENT + TRAVEL_INSURANCE_PROTECTION -> Known.TRAVEL_INSURANCE_PROTECTION + CONSTRUCTION_MANAGEMENT_SOFTWARE -> + Known.CONSTRUCTION_MANAGEMENT_SOFTWARE + BIM_CAD_DESIGN_TOOLS -> Known.BIM_CAD_DESIGN_TOOLS + CONSTRUCTION_MARKETPLACES -> Known.CONSTRUCTION_MARKETPLACES + EQUIPMENT_RENTAL_MANAGEMENT -> Known.EQUIPMENT_RENTAL_MANAGEMENT + BUILDING_MATERIALS_PROCUREMENT -> Known.BUILDING_MATERIALS_PROCUREMENT + CONSTRUCTION_WORKFORCE_MANAGEMENT -> + Known.CONSTRUCTION_WORKFORCE_MANAGEMENT + PROJECT_ESTIMATION_BIDDING -> Known.PROJECT_ESTIMATION_BIDDING + MODULAR_PREFAB_CONSTRUCTION -> Known.MODULAR_PREFAB_CONSTRUCTION + CONSTRUCTION_SAFETY_COMPLIANCE -> Known.CONSTRUCTION_SAFETY_COMPLIANCE + SMART_BUILDING_TECHNOLOGY -> Known.SMART_BUILDING_TECHNOLOGY + FOOD_BEVERAGE_CPG -> Known.FOOD_BEVERAGE_CPG + HOME_PERSONAL_CARE_CPG -> Known.HOME_PERSONAL_CARE_CPG + CPG_ANALYTICS_INSIGHTS -> Known.CPG_ANALYTICS_INSIGHTS + DIRECT_TO_CONSUMER_CPG_BRANDS -> Known.DIRECT_TO_CONSUMER_CPG_BRANDS + CPG_SUPPLY_CHAIN_DISTRIBUTION -> Known.CPG_SUPPLY_CHAIN_DISTRIBUTION + PRIVATE_LABEL_MANUFACTURING -> Known.PRIVATE_LABEL_MANUFACTURING + CPG_RETAIL_INTELLIGENCE -> Known.CPG_RETAIL_INTELLIGENCE + SUSTAINABLE_CPG_PACKAGING -> Known.SUSTAINABLE_CPG_PACKAGING + BEAUTY_COSMETICS_CPG -> Known.BEAUTY_COSMETICS_CPG + HEALTH_WELLNESS_CPG -> Known.HEALTH_WELLNESS_CPG + else -> + throw BrandDevInvalidDataException("Unknown Subindustry: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not + * have the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Subindustry = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Subindustry && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Eic && + industry == other.industry && + subindustry == other.subindustry && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(industry, subindustry, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Eic{industry=$industry, subindustry=$subindustry, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Industries && + eic == other.eic && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(eic, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Industries{eic=$eic, additionalProperties=$additionalProperties}" + } + + /** Important website links for the brand */ + class Links + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val blog: JsonField, + private val careers: JsonField, + private val contact: JsonField, + private val pricing: JsonField, + private val privacy: JsonField, + private val terms: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("blog") @ExcludeMissing blog: JsonField = JsonMissing.of(), + @JsonProperty("careers") + @ExcludeMissing + careers: JsonField = JsonMissing.of(), + @JsonProperty("contact") + @ExcludeMissing + contact: JsonField = JsonMissing.of(), + @JsonProperty("pricing") + @ExcludeMissing + pricing: JsonField = JsonMissing.of(), + @JsonProperty("privacy") + @ExcludeMissing + privacy: JsonField = JsonMissing.of(), + @JsonProperty("terms") @ExcludeMissing terms: JsonField = JsonMissing.of(), + ) : this(blog, careers, contact, pricing, privacy, terms, mutableMapOf()) + + /** + * URL to the brand's blog or news page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun blog(): Optional = blog.getOptional("blog") + + /** + * URL to the brand's careers or job opportunities page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun careers(): Optional = careers.getOptional("careers") + + /** + * URL to the brand's contact or contact us page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun contact(): Optional = contact.getOptional("contact") + + /** + * URL to the brand's pricing or plans page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun pricing(): Optional = pricing.getOptional("pricing") + + /** + * URL to the brand's privacy policy page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun privacy(): Optional = privacy.getOptional("privacy") + + /** + * URL to the brand's terms of service or terms and conditions page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun terms(): Optional = terms.getOptional("terms") + + /** + * Returns the raw JSON value of [blog]. + * + * Unlike [blog], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("blog") @ExcludeMissing fun _blog(): JsonField = blog + + /** + * Returns the raw JSON value of [careers]. + * + * Unlike [careers], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("careers") @ExcludeMissing fun _careers(): JsonField = careers + + /** + * Returns the raw JSON value of [contact]. + * + * Unlike [contact], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("contact") @ExcludeMissing fun _contact(): JsonField = contact + + /** + * Returns the raw JSON value of [pricing]. + * + * Unlike [pricing], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("pricing") @ExcludeMissing fun _pricing(): JsonField = pricing + + /** + * Returns the raw JSON value of [privacy]. + * + * Unlike [privacy], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("privacy") @ExcludeMissing fun _privacy(): JsonField = privacy + + /** + * Returns the raw JSON value of [terms]. + * + * Unlike [terms], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("terms") @ExcludeMissing fun _terms(): JsonField = terms + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Links]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Links]. */ + class Builder internal constructor() { + + private var blog: JsonField = JsonMissing.of() + private var careers: JsonField = JsonMissing.of() + private var contact: JsonField = JsonMissing.of() + private var pricing: JsonField = JsonMissing.of() + private var privacy: JsonField = JsonMissing.of() + private var terms: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(links: Links) = apply { + blog = links.blog + careers = links.careers + contact = links.contact + pricing = links.pricing + privacy = links.privacy + terms = links.terms + additionalProperties = links.additionalProperties.toMutableMap() + } + + /** URL to the brand's blog or news page */ + fun blog(blog: String?) = blog(JsonField.ofNullable(blog)) + + /** Alias for calling [Builder.blog] with `blog.orElse(null)`. */ + fun blog(blog: Optional) = blog(blog.getOrNull()) + + /** + * Sets [Builder.blog] to an arbitrary JSON value. + * + * You should usually call [Builder.blog] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun blog(blog: JsonField) = apply { this.blog = blog } + + /** URL to the brand's careers or job opportunities page */ + fun careers(careers: String?) = careers(JsonField.ofNullable(careers)) + + /** Alias for calling [Builder.careers] with `careers.orElse(null)`. */ + fun careers(careers: Optional) = careers(careers.getOrNull()) + + /** + * Sets [Builder.careers] to an arbitrary JSON value. + * + * You should usually call [Builder.careers] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun careers(careers: JsonField) = apply { this.careers = careers } + + /** URL to the brand's contact or contact us page */ + fun contact(contact: String?) = contact(JsonField.ofNullable(contact)) + + /** Alias for calling [Builder.contact] with `contact.orElse(null)`. */ + fun contact(contact: Optional) = contact(contact.getOrNull()) + + /** + * Sets [Builder.contact] to an arbitrary JSON value. + * + * You should usually call [Builder.contact] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun contact(contact: JsonField) = apply { this.contact = contact } + + /** URL to the brand's pricing or plans page */ + fun pricing(pricing: String?) = pricing(JsonField.ofNullable(pricing)) + + /** Alias for calling [Builder.pricing] with `pricing.orElse(null)`. */ + fun pricing(pricing: Optional) = pricing(pricing.getOrNull()) + + /** + * Sets [Builder.pricing] to an arbitrary JSON value. + * + * You should usually call [Builder.pricing] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun pricing(pricing: JsonField) = apply { this.pricing = pricing } + + /** URL to the brand's privacy policy page */ + fun privacy(privacy: String?) = privacy(JsonField.ofNullable(privacy)) + + /** Alias for calling [Builder.privacy] with `privacy.orElse(null)`. */ + fun privacy(privacy: Optional) = privacy(privacy.getOrNull()) + + /** + * Sets [Builder.privacy] to an arbitrary JSON value. + * + * You should usually call [Builder.privacy] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun privacy(privacy: JsonField) = apply { this.privacy = privacy } + + /** URL to the brand's terms of service or terms and conditions page */ + fun terms(terms: String?) = terms(JsonField.ofNullable(terms)) + + /** Alias for calling [Builder.terms] with `terms.orElse(null)`. */ + fun terms(terms: Optional) = terms(terms.getOrNull()) + + /** + * Sets [Builder.terms] to an arbitrary JSON value. + * + * You should usually call [Builder.terms] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun terms(terms: JsonField) = apply { this.terms = terms } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Links]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Links = + Links( + blog, + careers, + contact, + pricing, + privacy, + terms, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Links = apply { + if (validated) { + return@apply + } + + blog() + careers() + contact() + pricing() + privacy() + terms() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (blog.asKnown().isPresent) 1 else 0) + + (if (careers.asKnown().isPresent) 1 else 0) + + (if (contact.asKnown().isPresent) 1 else 0) + + (if (pricing.asKnown().isPresent) 1 else 0) + + (if (privacy.asKnown().isPresent) 1 else 0) + + (if (terms.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Links && + blog == other.blog && + careers == other.careers && + contact == other.contact && + pricing == other.pricing && + privacy == other.privacy && + terms == other.terms && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(blog, careers, contact, pricing, privacy, terms, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Links{blog=$blog, careers=$careers, contact=$contact, pricing=$pricing, privacy=$privacy, terms=$terms, additionalProperties=$additionalProperties}" + } + + class Logo + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val colors: JsonField>, + private val mode: JsonField, + private val resolution: JsonField, + private val type: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("mode") @ExcludeMissing mode: JsonField = JsonMissing.of(), + @JsonProperty("resolution") + @ExcludeMissing + resolution: JsonField = JsonMissing.of(), + @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(colors, mode, resolution, type, url, mutableMapOf()) + + /** + * Array of colors in the logo + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = best + * for dark mode, 'has_opaque_background' = can be used for either as image has its own + * background + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun mode(): Optional = mode.getOptional("mode") + + /** + * Resolution of the logo image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun resolution(): Optional = resolution.getOptional("resolution") + + /** + * Type of the logo based on resolution (e.g., 'icon', 'logo') + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun type(): Optional = type.getOptional("type") + + /** + * CDN hosted url of the logo (ready for display) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [mode]. + * + * Unlike [mode], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("mode") @ExcludeMissing fun _mode(): JsonField = mode + + /** + * Returns the raw JSON value of [resolution]. + * + * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("resolution") + @ExcludeMissing + fun _resolution(): JsonField = resolution + + /** + * Returns the raw JSON value of [type]. + * + * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Logo]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Logo]. */ + class Builder internal constructor() { + + private var colors: JsonField>? = null + private var mode: JsonField = JsonMissing.of() + private var resolution: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(logo: Logo) = apply { + colors = logo.colors.map { it.toMutableList() } + mode = logo.mode + resolution = logo.resolution + type = logo.type + url = logo.url + additionalProperties = logo.additionalProperties.toMutableMap() + } + + /** Array of colors in the logo */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = + * best for dark mode, 'has_opaque_background' = can be used for either as image has + * its own background + */ + fun mode(mode: Mode) = mode(JsonField.of(mode)) + + /** + * Sets [Builder.mode] to an arbitrary JSON value. + * + * You should usually call [Builder.mode] with a well-typed [Mode] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun mode(mode: JsonField) = apply { this.mode = mode } + + /** Resolution of the logo image */ + fun resolution(resolution: Resolution) = resolution(JsonField.of(resolution)) + + /** + * Sets [Builder.resolution] to an arbitrary JSON value. + * + * You should usually call [Builder.resolution] with a well-typed [Resolution] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun resolution(resolution: JsonField) = apply { + this.resolution = resolution + } + + /** Type of the logo based on resolution (e.g., 'icon', 'logo') */ + fun type(type: Type) = type(JsonField.of(type)) + + /** + * Sets [Builder.type] to an arbitrary JSON value. + * + * You should usually call [Builder.type] with a well-typed [Type] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun type(type: JsonField) = apply { this.type = type } + + /** CDN hosted url of the logo (ready for display) */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Logo]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Logo = + Logo( + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + mode, + resolution, + type, + url, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Logo = apply { + if (validated) { + return@apply + } + + colors().ifPresent { it.forEach { it.validate() } } + mode().ifPresent { it.validate() } + resolution().ifPresent { it.validate() } + type().ifPresent { it.validate() } + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (mode.asKnown().getOrNull()?.validity() ?: 0) + + (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (type.asKnown().getOrNull()?.validity() ?: 0) + + (if (url.asKnown().isPresent) 1 else 0) + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = best + * for dark mode, 'has_opaque_background' = can be used for either as image has its own + * background + */ + class Mode @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val LIGHT = of("light") + + @JvmField val DARK = of("dark") + + @JvmField val HAS_OPAQUE_BACKGROUND = of("has_opaque_background") + + @JvmStatic fun of(value: String) = Mode(JsonField.of(value)) + } + + /** An enum containing [Mode]'s known values. */ + enum class Known { + LIGHT, + DARK, + HAS_OPAQUE_BACKGROUND, + } + + /** + * An enum containing [Mode]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Mode] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + LIGHT, + DARK, + HAS_OPAQUE_BACKGROUND, + /** + * An enum member indicating that [Mode] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + LIGHT -> Value.LIGHT + DARK -> Value.DARK + HAS_OPAQUE_BACKGROUND -> Value.HAS_OPAQUE_BACKGROUND + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + LIGHT -> Known.LIGHT + DARK -> Known.DARK + HAS_OPAQUE_BACKGROUND -> Known.HAS_OPAQUE_BACKGROUND + else -> throw BrandDevInvalidDataException("Unknown Mode: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Mode = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Mode && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** Resolution of the logo image */ + class Resolution + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val aspectRatio: JsonField, + private val height: JsonField, + private val width: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("aspect_ratio") + @ExcludeMissing + aspectRatio: JsonField = JsonMissing.of(), + @JsonProperty("height") + @ExcludeMissing + height: JsonField = JsonMissing.of(), + @JsonProperty("width") @ExcludeMissing width: JsonField = JsonMissing.of(), + ) : this(aspectRatio, height, width, mutableMapOf()) + + /** + * Aspect ratio of the image (width/height) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun aspectRatio(): Optional = aspectRatio.getOptional("aspect_ratio") + + /** + * Height of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun height(): Optional = height.getOptional("height") + + /** + * Width of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun width(): Optional = width.getOptional("width") + + /** + * Returns the raw JSON value of [aspectRatio]. + * + * Unlike [aspectRatio], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("aspect_ratio") + @ExcludeMissing + fun _aspectRatio(): JsonField = aspectRatio + + /** + * Returns the raw JSON value of [height]. + * + * Unlike [height], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("height") @ExcludeMissing fun _height(): JsonField = height + + /** + * Returns the raw JSON value of [width]. + * + * Unlike [width], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("width") @ExcludeMissing fun _width(): JsonField = width + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Resolution]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Resolution]. */ + class Builder internal constructor() { + + private var aspectRatio: JsonField = JsonMissing.of() + private var height: JsonField = JsonMissing.of() + private var width: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(resolution: Resolution) = apply { + aspectRatio = resolution.aspectRatio + height = resolution.height + width = resolution.width + additionalProperties = resolution.additionalProperties.toMutableMap() + } + + /** Aspect ratio of the image (width/height) */ + fun aspectRatio(aspectRatio: Double) = aspectRatio(JsonField.of(aspectRatio)) + + /** + * Sets [Builder.aspectRatio] to an arbitrary JSON value. + * + * You should usually call [Builder.aspectRatio] with a well-typed [Double] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun aspectRatio(aspectRatio: JsonField) = apply { + this.aspectRatio = aspectRatio + } + + /** Height of the image in pixels */ + fun height(height: Long) = height(JsonField.of(height)) + + /** + * Sets [Builder.height] to an arbitrary JSON value. + * + * You should usually call [Builder.height] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun height(height: JsonField) = apply { this.height = height } + + /** Width of the image in pixels */ + fun width(width: Long) = width(JsonField.of(width)) + + /** + * Sets [Builder.width] to an arbitrary JSON value. + * + * You should usually call [Builder.width] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun width(width: JsonField) = apply { this.width = width } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Resolution]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Resolution = + Resolution(aspectRatio, height, width, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Resolution = apply { + if (validated) { + return@apply + } + + aspectRatio() + height() + width() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (aspectRatio.asKnown().isPresent) 1 else 0) + + (if (height.asKnown().isPresent) 1 else 0) + + (if (width.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Resolution && + aspectRatio == other.aspectRatio && + height == other.height && + width == other.width && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(aspectRatio, height, width, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Resolution{aspectRatio=$aspectRatio, height=$height, width=$width, additionalProperties=$additionalProperties}" + } + + /** Type of the logo based on resolution (e.g., 'icon', 'logo') */ + class Type @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ICON = of("icon") + + @JvmField val LOGO = of("logo") + + @JvmStatic fun of(value: String) = Type(JsonField.of(value)) + } + + /** An enum containing [Type]'s known values. */ + enum class Known { + ICON, + LOGO, + } + + /** + * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Type] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ICON, + LOGO, + /** + * An enum member indicating that [Type] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ICON -> Value.ICON + LOGO -> Value.LOGO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + ICON -> Known.ICON + LOGO -> Known.LOGO + else -> throw BrandDevInvalidDataException("Unknown Type: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Type = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Type && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Logo && + colors == other.colors && + mode == other.mode && + resolution == other.resolution && + type == other.type && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(colors, mode, resolution, type, url, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Logo{colors=$colors, mode=$mode, resolution=$resolution, type=$type, url=$url, additionalProperties=$additionalProperties}" + } + + class Social + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val type: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(type, url, mutableMapOf()) + + /** + * Type of social media, e.g., 'facebook', 'twitter' + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun type(): Optional = type.getOptional("type") + + /** + * URL of the social media page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [type]. + * + * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Social]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Social]. */ + class Builder internal constructor() { + + private var type: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(social: Social) = apply { + type = social.type + url = social.url + additionalProperties = social.additionalProperties.toMutableMap() + } + + /** Type of social media, e.g., 'facebook', 'twitter' */ + fun type(type: String) = type(JsonField.of(type)) + + /** + * Sets [Builder.type] to an arbitrary JSON value. + * + * You should usually call [Builder.type] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun type(type: JsonField) = apply { this.type = type } + + /** URL of the social media page */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Social]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Social = Social(type, url, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Social = apply { + if (validated) { + return@apply + } + + type() + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (type.asKnown().isPresent) 1 else 0) + (if (url.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Social && + type == other.type && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(type, url, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Social{type=$type, url=$url, additionalProperties=$additionalProperties}" + } + + /** + * Stock market information for this brand (will be null if not a publicly traded company) + */ + class Stock + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val exchange: JsonField, + private val ticker: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("exchange") + @ExcludeMissing + exchange: JsonField = JsonMissing.of(), + @JsonProperty("ticker") @ExcludeMissing ticker: JsonField = JsonMissing.of(), + ) : this(exchange, ticker, mutableMapOf()) + + /** + * Stock exchange name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun exchange(): Optional = exchange.getOptional("exchange") + + /** + * Stock ticker symbol + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun ticker(): Optional = ticker.getOptional("ticker") + + /** + * Returns the raw JSON value of [exchange]. + * + * Unlike [exchange], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("exchange") @ExcludeMissing fun _exchange(): JsonField = exchange + + /** + * Returns the raw JSON value of [ticker]. + * + * Unlike [ticker], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("ticker") @ExcludeMissing fun _ticker(): JsonField = ticker + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Stock]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Stock]. */ + class Builder internal constructor() { + + private var exchange: JsonField = JsonMissing.of() + private var ticker: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(stock: Stock) = apply { + exchange = stock.exchange + ticker = stock.ticker + additionalProperties = stock.additionalProperties.toMutableMap() + } + + /** Stock exchange name */ + fun exchange(exchange: String) = exchange(JsonField.of(exchange)) + + /** + * Sets [Builder.exchange] to an arbitrary JSON value. + * + * You should usually call [Builder.exchange] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun exchange(exchange: JsonField) = apply { this.exchange = exchange } + + /** Stock ticker symbol */ + fun ticker(ticker: String) = ticker(JsonField.of(ticker)) + + /** + * Sets [Builder.ticker] to an arbitrary JSON value. + * + * You should usually call [Builder.ticker] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun ticker(ticker: JsonField) = apply { this.ticker = ticker } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Stock]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Stock = Stock(exchange, ticker, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Stock = apply { + if (validated) { + return@apply + } + + exchange() + ticker() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (exchange.asKnown().isPresent) 1 else 0) + + (if (ticker.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Stock && + exchange == other.exchange && + ticker == other.ticker && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(exchange, ticker, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Stock{exchange=$exchange, ticker=$ticker, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Brand && + address == other.address && + backdrops == other.backdrops && + colors == other.colors && + description == other.description && + domain == other.domain && + email == other.email && + industries == other.industries && + isNsfw == other.isNsfw && + links == other.links && + logos == other.logos && + phone == other.phone && + slogan == other.slogan && + socials == other.socials && + stock == other.stock && + title == other.title && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + address, + backdrops, + colors, + description, + domain, + email, + industries, + isNsfw, + links, + logos, + phone, + slogan, + socials, + stock, + title, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Brand{address=$address, backdrops=$backdrops, colors=$colors, description=$description, domain=$domain, email=$email, industries=$industries, isNsfw=$isNsfw, links=$links, logos=$logos, phone=$phone, slogan=$slogan, socials=$socials, stock=$stock, title=$title, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is BrandRetrieveByNameResponse && + brand == other.brand && + code == other.code && + status == other.status && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(brand, code, status, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "BrandRetrieveByNameResponse{brand=$brand, code=$code, status=$status, additionalProperties=$additionalProperties}" +} diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParams.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParams.kt new file mode 100644 index 0000000..64e607f --- /dev/null +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParams.kt @@ -0,0 +1,1306 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.Enum +import com.branddev.api.core.JsonField +import com.branddev.api.core.Params +import com.branddev.api.core.checkRequired +import com.branddev.api.core.http.Headers +import com.branddev.api.core.http.QueryParams +import com.branddev.api.errors.BrandDevInvalidDataException +import com.fasterxml.jackson.annotation.JsonCreator +import java.util.Objects +import java.util.Optional +import kotlin.jvm.optionals.getOrNull + +/** + * Retrieve brand information using a stock ticker symbol. This endpoint looks up the company + * associated with the ticker and returns its brand data. + */ +class BrandRetrieveByTickerParams +private constructor( + private val ticker: String, + private val forceLanguage: ForceLanguage?, + private val maxSpeed: Boolean?, + private val tickerExchange: TickerExchange?, + private val timeoutMs: Long?, + private val additionalHeaders: Headers, + private val additionalQueryParams: QueryParams, +) : Params { + + /** + * Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). Must be 1-15 + * characters, letters/numbers/dots only. + */ + fun ticker(): String = ticker + + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(): Optional = Optional.ofNullable(forceLanguage) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API will + * skip time-consuming operations for faster response at the cost of less comprehensive data. + */ + fun maxSpeed(): Optional = Optional.ofNullable(maxSpeed) + + /** Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. */ + fun tickerExchange(): Optional = Optional.ofNullable(tickerExchange) + + /** + * Optional timeout in milliseconds for the request. If the request takes longer than this + * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 + * minutes). + */ + fun timeoutMs(): Optional = Optional.ofNullable(timeoutMs) + + /** Additional headers to send with the request. */ + fun _additionalHeaders(): Headers = additionalHeaders + + /** Additional query param to send with the request. */ + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [BrandRetrieveByTickerParams]. + * + * The following fields are required: + * ```java + * .ticker() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [BrandRetrieveByTickerParams]. */ + class Builder internal constructor() { + + private var ticker: String? = null + private var forceLanguage: ForceLanguage? = null + private var maxSpeed: Boolean? = null + private var tickerExchange: TickerExchange? = null + private var timeoutMs: Long? = null + private var additionalHeaders: Headers.Builder = Headers.builder() + private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() + + @JvmSynthetic + internal fun from(brandRetrieveByTickerParams: BrandRetrieveByTickerParams) = apply { + ticker = brandRetrieveByTickerParams.ticker + forceLanguage = brandRetrieveByTickerParams.forceLanguage + maxSpeed = brandRetrieveByTickerParams.maxSpeed + tickerExchange = brandRetrieveByTickerParams.tickerExchange + timeoutMs = brandRetrieveByTickerParams.timeoutMs + additionalHeaders = brandRetrieveByTickerParams.additionalHeaders.toBuilder() + additionalQueryParams = brandRetrieveByTickerParams.additionalQueryParams.toBuilder() + } + + /** + * Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). Must be + * 1-15 characters, letters/numbers/dots only. + */ + fun ticker(ticker: String) = apply { this.ticker = ticker } + + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(forceLanguage: ForceLanguage?) = apply { + this.forceLanguage = forceLanguage + } + + /** Alias for calling [Builder.forceLanguage] with `forceLanguage.orElse(null)`. */ + fun forceLanguage(forceLanguage: Optional) = + forceLanguage(forceLanguage.getOrNull()) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API + * will skip time-consuming operations for faster response at the cost of less comprehensive + * data. + */ + fun maxSpeed(maxSpeed: Boolean?) = apply { this.maxSpeed = maxSpeed } + + /** + * Alias for [Builder.maxSpeed]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun maxSpeed(maxSpeed: Boolean) = maxSpeed(maxSpeed as Boolean?) + + /** Alias for calling [Builder.maxSpeed] with `maxSpeed.orElse(null)`. */ + fun maxSpeed(maxSpeed: Optional) = maxSpeed(maxSpeed.getOrNull()) + + /** Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. */ + fun tickerExchange(tickerExchange: TickerExchange?) = apply { + this.tickerExchange = tickerExchange + } + + /** Alias for calling [Builder.tickerExchange] with `tickerExchange.orElse(null)`. */ + fun tickerExchange(tickerExchange: Optional) = + tickerExchange(tickerExchange.getOrNull()) + + /** + * Optional timeout in milliseconds for the request. If the request takes longer than this + * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 + * minutes). + */ + fun timeoutMs(timeoutMs: Long?) = apply { this.timeoutMs = timeoutMs } + + /** + * Alias for [Builder.timeoutMs]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun timeoutMs(timeoutMs: Long) = timeoutMs(timeoutMs as Long?) + + /** Alias for calling [Builder.timeoutMs] with `timeoutMs.orElse(null)`. */ + fun timeoutMs(timeoutMs: Optional) = timeoutMs(timeoutMs.getOrNull()) + + fun additionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.clear() + putAllAdditionalHeaders(additionalHeaders) + } + + fun additionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.clear() + putAllAdditionalHeaders(additionalHeaders) + } + + fun putAdditionalHeader(name: String, value: String) = apply { + additionalHeaders.put(name, value) + } + + fun putAdditionalHeaders(name: String, values: Iterable) = apply { + additionalHeaders.put(name, values) + } + + fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.putAll(additionalHeaders) + } + + fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.putAll(additionalHeaders) + } + + fun replaceAdditionalHeaders(name: String, value: String) = apply { + additionalHeaders.replace(name, value) + } + + fun replaceAdditionalHeaders(name: String, values: Iterable) = apply { + additionalHeaders.replace(name, values) + } + + fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply { + this.additionalHeaders.replaceAll(additionalHeaders) + } + + fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply { + this.additionalHeaders.replaceAll(additionalHeaders) + } + + fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) } + + fun removeAllAdditionalHeaders(names: Set) = apply { + additionalHeaders.removeAll(names) + } + + fun additionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.clear() + putAllAdditionalQueryParams(additionalQueryParams) + } + + fun additionalQueryParams(additionalQueryParams: Map>) = apply { + this.additionalQueryParams.clear() + putAllAdditionalQueryParams(additionalQueryParams) + } + + fun putAdditionalQueryParam(key: String, value: String) = apply { + additionalQueryParams.put(key, value) + } + + fun putAdditionalQueryParams(key: String, values: Iterable) = apply { + additionalQueryParams.put(key, values) + } + + fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.putAll(additionalQueryParams) + } + + fun putAllAdditionalQueryParams(additionalQueryParams: Map>) = + apply { + this.additionalQueryParams.putAll(additionalQueryParams) + } + + fun replaceAdditionalQueryParams(key: String, value: String) = apply { + additionalQueryParams.replace(key, value) + } + + fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply { + additionalQueryParams.replace(key, values) + } + + fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply { + this.additionalQueryParams.replaceAll(additionalQueryParams) + } + + fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) = + apply { + this.additionalQueryParams.replaceAll(additionalQueryParams) + } + + fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) } + + fun removeAllAdditionalQueryParams(keys: Set) = apply { + additionalQueryParams.removeAll(keys) + } + + /** + * Returns an immutable instance of [BrandRetrieveByTickerParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .ticker() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): BrandRetrieveByTickerParams = + BrandRetrieveByTickerParams( + checkRequired("ticker", ticker), + forceLanguage, + maxSpeed, + tickerExchange, + timeoutMs, + additionalHeaders.build(), + additionalQueryParams.build(), + ) + } + + override fun _headers(): Headers = additionalHeaders + + override fun _queryParams(): QueryParams = + QueryParams.builder() + .apply { + put("ticker", ticker) + forceLanguage?.let { put("force_language", it.toString()) } + maxSpeed?.let { put("maxSpeed", it.toString()) } + tickerExchange?.let { put("ticker_exchange", it.toString()) } + timeoutMs?.let { put("timeoutMS", it.toString()) } + putAll(additionalQueryParams) + } + .build() + + /** Optional parameter to force the language of the retrieved brand data. */ + class ForceLanguage @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ALBANIAN = of("albanian") + + @JvmField val ARABIC = of("arabic") + + @JvmField val AZERI = of("azeri") + + @JvmField val BENGALI = of("bengali") + + @JvmField val BULGARIAN = of("bulgarian") + + @JvmField val CEBUANO = of("cebuano") + + @JvmField val CROATIAN = of("croatian") + + @JvmField val CZECH = of("czech") + + @JvmField val DANISH = of("danish") + + @JvmField val DUTCH = of("dutch") + + @JvmField val ENGLISH = of("english") + + @JvmField val ESTONIAN = of("estonian") + + @JvmField val FARSI = of("farsi") + + @JvmField val FINNISH = of("finnish") + + @JvmField val FRENCH = of("french") + + @JvmField val GERMAN = of("german") + + @JvmField val HAUSA = of("hausa") + + @JvmField val HAWAIIAN = of("hawaiian") + + @JvmField val HINDI = of("hindi") + + @JvmField val HUNGARIAN = of("hungarian") + + @JvmField val ICELANDIC = of("icelandic") + + @JvmField val INDONESIAN = of("indonesian") + + @JvmField val ITALIAN = of("italian") + + @JvmField val KAZAKH = of("kazakh") + + @JvmField val KYRGYZ = of("kyrgyz") + + @JvmField val LATIN = of("latin") + + @JvmField val LATVIAN = of("latvian") + + @JvmField val LITHUANIAN = of("lithuanian") + + @JvmField val MACEDONIAN = of("macedonian") + + @JvmField val MONGOLIAN = of("mongolian") + + @JvmField val NEPALI = of("nepali") + + @JvmField val NORWEGIAN = of("norwegian") + + @JvmField val PASHTO = of("pashto") + + @JvmField val PIDGIN = of("pidgin") + + @JvmField val POLISH = of("polish") + + @JvmField val PORTUGUESE = of("portuguese") + + @JvmField val ROMANIAN = of("romanian") + + @JvmField val RUSSIAN = of("russian") + + @JvmField val SERBIAN = of("serbian") + + @JvmField val SLOVAK = of("slovak") + + @JvmField val SLOVENE = of("slovene") + + @JvmField val SOMALI = of("somali") + + @JvmField val SPANISH = of("spanish") + + @JvmField val SWAHILI = of("swahili") + + @JvmField val SWEDISH = of("swedish") + + @JvmField val TAGALOG = of("tagalog") + + @JvmField val TURKISH = of("turkish") + + @JvmField val UKRAINIAN = of("ukrainian") + + @JvmField val URDU = of("urdu") + + @JvmField val UZBEK = of("uzbek") + + @JvmField val VIETNAMESE = of("vietnamese") + + @JvmField val WELSH = of("welsh") + + @JvmStatic fun of(value: String) = ForceLanguage(JsonField.of(value)) + } + + /** An enum containing [ForceLanguage]'s known values. */ + enum class Known { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + } + + /** + * An enum containing [ForceLanguage]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [ForceLanguage] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + /** + * An enum member indicating that [ForceLanguage] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ALBANIAN -> Value.ALBANIAN + ARABIC -> Value.ARABIC + AZERI -> Value.AZERI + BENGALI -> Value.BENGALI + BULGARIAN -> Value.BULGARIAN + CEBUANO -> Value.CEBUANO + CROATIAN -> Value.CROATIAN + CZECH -> Value.CZECH + DANISH -> Value.DANISH + DUTCH -> Value.DUTCH + ENGLISH -> Value.ENGLISH + ESTONIAN -> Value.ESTONIAN + FARSI -> Value.FARSI + FINNISH -> Value.FINNISH + FRENCH -> Value.FRENCH + GERMAN -> Value.GERMAN + HAUSA -> Value.HAUSA + HAWAIIAN -> Value.HAWAIIAN + HINDI -> Value.HINDI + HUNGARIAN -> Value.HUNGARIAN + ICELANDIC -> Value.ICELANDIC + INDONESIAN -> Value.INDONESIAN + ITALIAN -> Value.ITALIAN + KAZAKH -> Value.KAZAKH + KYRGYZ -> Value.KYRGYZ + LATIN -> Value.LATIN + LATVIAN -> Value.LATVIAN + LITHUANIAN -> Value.LITHUANIAN + MACEDONIAN -> Value.MACEDONIAN + MONGOLIAN -> Value.MONGOLIAN + NEPALI -> Value.NEPALI + NORWEGIAN -> Value.NORWEGIAN + PASHTO -> Value.PASHTO + PIDGIN -> Value.PIDGIN + POLISH -> Value.POLISH + PORTUGUESE -> Value.PORTUGUESE + ROMANIAN -> Value.ROMANIAN + RUSSIAN -> Value.RUSSIAN + SERBIAN -> Value.SERBIAN + SLOVAK -> Value.SLOVAK + SLOVENE -> Value.SLOVENE + SOMALI -> Value.SOMALI + SPANISH -> Value.SPANISH + SWAHILI -> Value.SWAHILI + SWEDISH -> Value.SWEDISH + TAGALOG -> Value.TAGALOG + TURKISH -> Value.TURKISH + UKRAINIAN -> Value.UKRAINIAN + URDU -> Value.URDU + UZBEK -> Value.UZBEK + VIETNAMESE -> Value.VIETNAMESE + WELSH -> Value.WELSH + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + ALBANIAN -> Known.ALBANIAN + ARABIC -> Known.ARABIC + AZERI -> Known.AZERI + BENGALI -> Known.BENGALI + BULGARIAN -> Known.BULGARIAN + CEBUANO -> Known.CEBUANO + CROATIAN -> Known.CROATIAN + CZECH -> Known.CZECH + DANISH -> Known.DANISH + DUTCH -> Known.DUTCH + ENGLISH -> Known.ENGLISH + ESTONIAN -> Known.ESTONIAN + FARSI -> Known.FARSI + FINNISH -> Known.FINNISH + FRENCH -> Known.FRENCH + GERMAN -> Known.GERMAN + HAUSA -> Known.HAUSA + HAWAIIAN -> Known.HAWAIIAN + HINDI -> Known.HINDI + HUNGARIAN -> Known.HUNGARIAN + ICELANDIC -> Known.ICELANDIC + INDONESIAN -> Known.INDONESIAN + ITALIAN -> Known.ITALIAN + KAZAKH -> Known.KAZAKH + KYRGYZ -> Known.KYRGYZ + LATIN -> Known.LATIN + LATVIAN -> Known.LATVIAN + LITHUANIAN -> Known.LITHUANIAN + MACEDONIAN -> Known.MACEDONIAN + MONGOLIAN -> Known.MONGOLIAN + NEPALI -> Known.NEPALI + NORWEGIAN -> Known.NORWEGIAN + PASHTO -> Known.PASHTO + PIDGIN -> Known.PIDGIN + POLISH -> Known.POLISH + PORTUGUESE -> Known.PORTUGUESE + ROMANIAN -> Known.ROMANIAN + RUSSIAN -> Known.RUSSIAN + SERBIAN -> Known.SERBIAN + SLOVAK -> Known.SLOVAK + SLOVENE -> Known.SLOVENE + SOMALI -> Known.SOMALI + SPANISH -> Known.SPANISH + SWAHILI -> Known.SWAHILI + SWEDISH -> Known.SWEDISH + TAGALOG -> Known.TAGALOG + TURKISH -> Known.TURKISH + UKRAINIAN -> Known.UKRAINIAN + URDU -> Known.URDU + UZBEK -> Known.UZBEK + VIETNAMESE -> Known.VIETNAMESE + WELSH -> Known.WELSH + else -> throw BrandDevInvalidDataException("Unknown ForceLanguage: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): ForceLanguage = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is ForceLanguage && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. */ + class TickerExchange @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val AMEX = of("AMEX") + + @JvmField val AMS = of("AMS") + + @JvmField val AQS = of("AQS") + + @JvmField val ASX = of("ASX") + + @JvmField val ATH = of("ATH") + + @JvmField val BER = of("BER") + + @JvmField val BME = of("BME") + + @JvmField val BRU = of("BRU") + + @JvmField val BSE = of("BSE") + + @JvmField val BUD = of("BUD") + + @JvmField val BUE = of("BUE") + + @JvmField val BVC = of("BVC") + + @JvmField val CBOE = of("CBOE") + + @JvmField val CNQ = of("CNQ") + + @JvmField val CPH = of("CPH") + + @JvmField val DFM = of("DFM") + + @JvmField val DOH = of("DOH") + + @JvmField val DUB = of("DUB") + + @JvmField val DUS = of("DUS") + + @JvmField val DXE = of("DXE") + + @JvmField val EGX = of("EGX") + + @JvmField val FSX = of("FSX") + + @JvmField val HAM = of("HAM") + + @JvmField val HEL = of("HEL") + + @JvmField val HKSE = of("HKSE") + + @JvmField val HOSE = of("HOSE") + + @JvmField val ICE = of("ICE") + + @JvmField val IOB = of("IOB") + + @JvmField val IST = of("IST") + + @JvmField val JKT = of("JKT") + + @JvmField val JNB = of("JNB") + + @JvmField val JPX = of("JPX") + + @JvmField val KLS = of("KLS") + + @JvmField val KOE = of("KOE") + + @JvmField val KSC = of("KSC") + + @JvmField val KUW = of("KUW") + + @JvmField val LIS = of("LIS") + + @JvmField val LSE = of("LSE") + + @JvmField val MCX = of("MCX") + + @JvmField val MEX = of("MEX") + + @JvmField val MIL = of("MIL") + + @JvmField val MUN = of("MUN") + + @JvmField val NASDAQ = of("NASDAQ") + + @JvmField val NEO = of("NEO") + + @JvmField val NSE = of("NSE") + + @JvmField val NYSE = of("NYSE") + + @JvmField val NZE = of("NZE") + + @JvmField val OSL = of("OSL") + + @JvmField val OTC = of("OTC") + + @JvmField val PAR = of("PAR") + + @JvmField val PNK = of("PNK") + + @JvmField val PRA = of("PRA") + + @JvmField val RIS = of("RIS") + + @JvmField val SAO = of("SAO") + + @JvmField val SAU = of("SAU") + + @JvmField val SES = of("SES") + + @JvmField val SET = of("SET") + + @JvmField val SGO = of("SGO") + + @JvmField val SHH = of("SHH") + + @JvmField val SHZ = of("SHZ") + + @JvmField val SIX = of("SIX") + + @JvmField val STO = of("STO") + + @JvmField val STU = of("STU") + + @JvmField val TAI = of("TAI") + + @JvmField val TAL = of("TAL") + + @JvmField val TLV = of("TLV") + + @JvmField val TSX = of("TSX") + + @JvmField val TSXV = of("TSXV") + + @JvmField val TWO = of("TWO") + + @JvmField val VIE = of("VIE") + + @JvmField val WSE = of("WSE") + + @JvmField val XETRA = of("XETRA") + + @JvmStatic fun of(value: String) = TickerExchange(JsonField.of(value)) + } + + /** An enum containing [TickerExchange]'s known values. */ + enum class Known { + AMEX, + AMS, + AQS, + ASX, + ATH, + BER, + BME, + BRU, + BSE, + BUD, + BUE, + BVC, + CBOE, + CNQ, + CPH, + DFM, + DOH, + DUB, + DUS, + DXE, + EGX, + FSX, + HAM, + HEL, + HKSE, + HOSE, + ICE, + IOB, + IST, + JKT, + JNB, + JPX, + KLS, + KOE, + KSC, + KUW, + LIS, + LSE, + MCX, + MEX, + MIL, + MUN, + NASDAQ, + NEO, + NSE, + NYSE, + NZE, + OSL, + OTC, + PAR, + PNK, + PRA, + RIS, + SAO, + SAU, + SES, + SET, + SGO, + SHH, + SHZ, + SIX, + STO, + STU, + TAI, + TAL, + TLV, + TSX, + TSXV, + TWO, + VIE, + WSE, + XETRA, + } + + /** + * An enum containing [TickerExchange]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [TickerExchange] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + AMEX, + AMS, + AQS, + ASX, + ATH, + BER, + BME, + BRU, + BSE, + BUD, + BUE, + BVC, + CBOE, + CNQ, + CPH, + DFM, + DOH, + DUB, + DUS, + DXE, + EGX, + FSX, + HAM, + HEL, + HKSE, + HOSE, + ICE, + IOB, + IST, + JKT, + JNB, + JPX, + KLS, + KOE, + KSC, + KUW, + LIS, + LSE, + MCX, + MEX, + MIL, + MUN, + NASDAQ, + NEO, + NSE, + NYSE, + NZE, + OSL, + OTC, + PAR, + PNK, + PRA, + RIS, + SAO, + SAU, + SES, + SET, + SGO, + SHH, + SHZ, + SIX, + STO, + STU, + TAI, + TAL, + TLV, + TSX, + TSXV, + TWO, + VIE, + WSE, + XETRA, + /** + * An enum member indicating that [TickerExchange] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + AMEX -> Value.AMEX + AMS -> Value.AMS + AQS -> Value.AQS + ASX -> Value.ASX + ATH -> Value.ATH + BER -> Value.BER + BME -> Value.BME + BRU -> Value.BRU + BSE -> Value.BSE + BUD -> Value.BUD + BUE -> Value.BUE + BVC -> Value.BVC + CBOE -> Value.CBOE + CNQ -> Value.CNQ + CPH -> Value.CPH + DFM -> Value.DFM + DOH -> Value.DOH + DUB -> Value.DUB + DUS -> Value.DUS + DXE -> Value.DXE + EGX -> Value.EGX + FSX -> Value.FSX + HAM -> Value.HAM + HEL -> Value.HEL + HKSE -> Value.HKSE + HOSE -> Value.HOSE + ICE -> Value.ICE + IOB -> Value.IOB + IST -> Value.IST + JKT -> Value.JKT + JNB -> Value.JNB + JPX -> Value.JPX + KLS -> Value.KLS + KOE -> Value.KOE + KSC -> Value.KSC + KUW -> Value.KUW + LIS -> Value.LIS + LSE -> Value.LSE + MCX -> Value.MCX + MEX -> Value.MEX + MIL -> Value.MIL + MUN -> Value.MUN + NASDAQ -> Value.NASDAQ + NEO -> Value.NEO + NSE -> Value.NSE + NYSE -> Value.NYSE + NZE -> Value.NZE + OSL -> Value.OSL + OTC -> Value.OTC + PAR -> Value.PAR + PNK -> Value.PNK + PRA -> Value.PRA + RIS -> Value.RIS + SAO -> Value.SAO + SAU -> Value.SAU + SES -> Value.SES + SET -> Value.SET + SGO -> Value.SGO + SHH -> Value.SHH + SHZ -> Value.SHZ + SIX -> Value.SIX + STO -> Value.STO + STU -> Value.STU + TAI -> Value.TAI + TAL -> Value.TAL + TLV -> Value.TLV + TSX -> Value.TSX + TSXV -> Value.TSXV + TWO -> Value.TWO + VIE -> Value.VIE + WSE -> Value.WSE + XETRA -> Value.XETRA + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + AMEX -> Known.AMEX + AMS -> Known.AMS + AQS -> Known.AQS + ASX -> Known.ASX + ATH -> Known.ATH + BER -> Known.BER + BME -> Known.BME + BRU -> Known.BRU + BSE -> Known.BSE + BUD -> Known.BUD + BUE -> Known.BUE + BVC -> Known.BVC + CBOE -> Known.CBOE + CNQ -> Known.CNQ + CPH -> Known.CPH + DFM -> Known.DFM + DOH -> Known.DOH + DUB -> Known.DUB + DUS -> Known.DUS + DXE -> Known.DXE + EGX -> Known.EGX + FSX -> Known.FSX + HAM -> Known.HAM + HEL -> Known.HEL + HKSE -> Known.HKSE + HOSE -> Known.HOSE + ICE -> Known.ICE + IOB -> Known.IOB + IST -> Known.IST + JKT -> Known.JKT + JNB -> Known.JNB + JPX -> Known.JPX + KLS -> Known.KLS + KOE -> Known.KOE + KSC -> Known.KSC + KUW -> Known.KUW + LIS -> Known.LIS + LSE -> Known.LSE + MCX -> Known.MCX + MEX -> Known.MEX + MIL -> Known.MIL + MUN -> Known.MUN + NASDAQ -> Known.NASDAQ + NEO -> Known.NEO + NSE -> Known.NSE + NYSE -> Known.NYSE + NZE -> Known.NZE + OSL -> Known.OSL + OTC -> Known.OTC + PAR -> Known.PAR + PNK -> Known.PNK + PRA -> Known.PRA + RIS -> Known.RIS + SAO -> Known.SAO + SAU -> Known.SAU + SES -> Known.SES + SET -> Known.SET + SGO -> Known.SGO + SHH -> Known.SHH + SHZ -> Known.SHZ + SIX -> Known.SIX + STO -> Known.STO + STU -> Known.STU + TAI -> Known.TAI + TAL -> Known.TAL + TLV -> Known.TLV + TSX -> Known.TSX + TSXV -> Known.TSXV + TWO -> Known.TWO + VIE -> Known.VIE + WSE -> Known.WSE + XETRA -> Known.XETRA + else -> throw BrandDevInvalidDataException("Unknown TickerExchange: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): TickerExchange = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is TickerExchange && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is BrandRetrieveByTickerParams && + ticker == other.ticker && + forceLanguage == other.forceLanguage && + maxSpeed == other.maxSpeed && + tickerExchange == other.tickerExchange && + timeoutMs == other.timeoutMs && + additionalHeaders == other.additionalHeaders && + additionalQueryParams == other.additionalQueryParams + } + + override fun hashCode(): Int = + Objects.hash( + ticker, + forceLanguage, + maxSpeed, + tickerExchange, + timeoutMs, + additionalHeaders, + additionalQueryParams, + ) + + override fun toString() = + "BrandRetrieveByTickerParams{ticker=$ticker, forceLanguage=$forceLanguage, maxSpeed=$maxSpeed, tickerExchange=$tickerExchange, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" +} diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponse.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponse.kt new file mode 100644 index 0000000..145fced --- /dev/null +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponse.kt @@ -0,0 +1,6388 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.Enum +import com.branddev.api.core.ExcludeMissing +import com.branddev.api.core.JsonField +import com.branddev.api.core.JsonMissing +import com.branddev.api.core.JsonValue +import com.branddev.api.core.checkKnown +import com.branddev.api.core.checkRequired +import com.branddev.api.core.toImmutable +import com.branddev.api.errors.BrandDevInvalidDataException +import com.fasterxml.jackson.annotation.JsonAnyGetter +import com.fasterxml.jackson.annotation.JsonAnySetter +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import java.util.Collections +import java.util.Objects +import java.util.Optional +import kotlin.jvm.optionals.getOrNull + +class BrandRetrieveByTickerResponse +@JsonCreator(mode = JsonCreator.Mode.DISABLED) +private constructor( + private val brand: JsonField, + private val code: JsonField, + private val status: JsonField, + private val additionalProperties: MutableMap, +) { + + @JsonCreator + private constructor( + @JsonProperty("brand") @ExcludeMissing brand: JsonField = JsonMissing.of(), + @JsonProperty("code") @ExcludeMissing code: JsonField = JsonMissing.of(), + @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), + ) : this(brand, code, status, mutableMapOf()) + + /** + * Detailed brand information + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun brand(): Optional = brand.getOptional("brand") + + /** + * HTTP status code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun code(): Optional = code.getOptional("code") + + /** + * Status of the response, e.g., 'ok' + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun status(): Optional = status.getOptional("status") + + /** + * Returns the raw JSON value of [brand]. + * + * Unlike [brand], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("brand") @ExcludeMissing fun _brand(): JsonField = brand + + /** + * Returns the raw JSON value of [code]. + * + * Unlike [code], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("code") @ExcludeMissing fun _code(): JsonField = code + + /** + * Returns the raw JSON value of [status]. + * + * Unlike [status], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of + * [BrandRetrieveByTickerResponse]. + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [BrandRetrieveByTickerResponse]. */ + class Builder internal constructor() { + + private var brand: JsonField = JsonMissing.of() + private var code: JsonField = JsonMissing.of() + private var status: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(brandRetrieveByTickerResponse: BrandRetrieveByTickerResponse) = apply { + brand = brandRetrieveByTickerResponse.brand + code = brandRetrieveByTickerResponse.code + status = brandRetrieveByTickerResponse.status + additionalProperties = brandRetrieveByTickerResponse.additionalProperties.toMutableMap() + } + + /** Detailed brand information */ + fun brand(brand: Brand) = brand(JsonField.of(brand)) + + /** + * Sets [Builder.brand] to an arbitrary JSON value. + * + * You should usually call [Builder.brand] with a well-typed [Brand] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun brand(brand: JsonField) = apply { this.brand = brand } + + /** HTTP status code */ + fun code(code: Long) = code(JsonField.of(code)) + + /** + * Sets [Builder.code] to an arbitrary JSON value. + * + * You should usually call [Builder.code] with a well-typed [Long] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun code(code: JsonField) = apply { this.code = code } + + /** Status of the response, e.g., 'ok' */ + fun status(status: String) = status(JsonField.of(status)) + + /** + * Sets [Builder.status] to an arbitrary JSON value. + * + * You should usually call [Builder.status] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun status(status: JsonField) = apply { this.status = status } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [BrandRetrieveByTickerResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): BrandRetrieveByTickerResponse = + BrandRetrieveByTickerResponse(brand, code, status, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): BrandRetrieveByTickerResponse = apply { + if (validated) { + return@apply + } + + brand().ifPresent { it.validate() } + code() + status() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (brand.asKnown().getOrNull()?.validity() ?: 0) + + (if (code.asKnown().isPresent) 1 else 0) + + (if (status.asKnown().isPresent) 1 else 0) + + /** Detailed brand information */ + class Brand + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val address: JsonField
, + private val backdrops: JsonField>, + private val colors: JsonField>, + private val description: JsonField, + private val domain: JsonField, + private val email: JsonField, + private val industries: JsonField, + private val isNsfw: JsonField, + private val links: JsonField, + private val logos: JsonField>, + private val phone: JsonField, + private val slogan: JsonField, + private val socials: JsonField>, + private val stock: JsonField, + private val title: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("address") @ExcludeMissing address: JsonField
= JsonMissing.of(), + @JsonProperty("backdrops") + @ExcludeMissing + backdrops: JsonField> = JsonMissing.of(), + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("description") + @ExcludeMissing + description: JsonField = JsonMissing.of(), + @JsonProperty("domain") @ExcludeMissing domain: JsonField = JsonMissing.of(), + @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(), + @JsonProperty("industries") + @ExcludeMissing + industries: JsonField = JsonMissing.of(), + @JsonProperty("is_nsfw") @ExcludeMissing isNsfw: JsonField = JsonMissing.of(), + @JsonProperty("links") @ExcludeMissing links: JsonField = JsonMissing.of(), + @JsonProperty("logos") @ExcludeMissing logos: JsonField> = JsonMissing.of(), + @JsonProperty("phone") @ExcludeMissing phone: JsonField = JsonMissing.of(), + @JsonProperty("slogan") @ExcludeMissing slogan: JsonField = JsonMissing.of(), + @JsonProperty("socials") + @ExcludeMissing + socials: JsonField> = JsonMissing.of(), + @JsonProperty("stock") @ExcludeMissing stock: JsonField = JsonMissing.of(), + @JsonProperty("title") @ExcludeMissing title: JsonField = JsonMissing.of(), + ) : this( + address, + backdrops, + colors, + description, + domain, + email, + industries, + isNsfw, + links, + logos, + phone, + slogan, + socials, + stock, + title, + mutableMapOf(), + ) + + /** + * Physical address of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun address(): Optional
= address.getOptional("address") + + /** + * An array of backdrop images for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun backdrops(): Optional> = backdrops.getOptional("backdrops") + + /** + * An array of brand colors + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * A brief description of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun description(): Optional = description.getOptional("description") + + /** + * The domain name of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun domain(): Optional = domain.getOptional("domain") + + /** + * Company email address + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun email(): Optional = email.getOptional("email") + + /** + * Industry classification information for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun industries(): Optional = industries.getOptional("industries") + + /** + * Indicates whether the brand content is not safe for work (NSFW) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun isNsfw(): Optional = isNsfw.getOptional("is_nsfw") + + /** + * Important website links for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun links(): Optional = links.getOptional("links") + + /** + * An array of logos associated with the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun logos(): Optional> = logos.getOptional("logos") + + /** + * Company phone number + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun phone(): Optional = phone.getOptional("phone") + + /** + * The brand's slogan + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun slogan(): Optional = slogan.getOptional("slogan") + + /** + * An array of social media links for the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun socials(): Optional> = socials.getOptional("socials") + + /** + * Stock market information for this brand (will be null if not a publicly traded company) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun stock(): Optional = stock.getOptional("stock") + + /** + * The title or name of the brand + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun title(): Optional = title.getOptional("title") + + /** + * Returns the raw JSON value of [address]. + * + * Unlike [address], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("address") @ExcludeMissing fun _address(): JsonField
= address + + /** + * Returns the raw JSON value of [backdrops]. + * + * Unlike [backdrops], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("backdrops") + @ExcludeMissing + fun _backdrops(): JsonField> = backdrops + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [description]. + * + * Unlike [description], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("description") + @ExcludeMissing + fun _description(): JsonField = description + + /** + * Returns the raw JSON value of [domain]. + * + * Unlike [domain], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("domain") @ExcludeMissing fun _domain(): JsonField = domain + + /** + * Returns the raw JSON value of [email]. + * + * Unlike [email], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email + + /** + * Returns the raw JSON value of [industries]. + * + * Unlike [industries], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("industries") + @ExcludeMissing + fun _industries(): JsonField = industries + + /** + * Returns the raw JSON value of [isNsfw]. + * + * Unlike [isNsfw], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("is_nsfw") @ExcludeMissing fun _isNsfw(): JsonField = isNsfw + + /** + * Returns the raw JSON value of [links]. + * + * Unlike [links], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("links") @ExcludeMissing fun _links(): JsonField = links + + /** + * Returns the raw JSON value of [logos]. + * + * Unlike [logos], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("logos") @ExcludeMissing fun _logos(): JsonField> = logos + + /** + * Returns the raw JSON value of [phone]. + * + * Unlike [phone], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("phone") @ExcludeMissing fun _phone(): JsonField = phone + + /** + * Returns the raw JSON value of [slogan]. + * + * Unlike [slogan], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("slogan") @ExcludeMissing fun _slogan(): JsonField = slogan + + /** + * Returns the raw JSON value of [socials]. + * + * Unlike [socials], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("socials") @ExcludeMissing fun _socials(): JsonField> = socials + + /** + * Returns the raw JSON value of [stock]. + * + * Unlike [stock], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("stock") @ExcludeMissing fun _stock(): JsonField = stock + + /** + * Returns the raw JSON value of [title]. + * + * Unlike [title], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("title") @ExcludeMissing fun _title(): JsonField = title + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Brand]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Brand]. */ + class Builder internal constructor() { + + private var address: JsonField
= JsonMissing.of() + private var backdrops: JsonField>? = null + private var colors: JsonField>? = null + private var description: JsonField = JsonMissing.of() + private var domain: JsonField = JsonMissing.of() + private var email: JsonField = JsonMissing.of() + private var industries: JsonField = JsonMissing.of() + private var isNsfw: JsonField = JsonMissing.of() + private var links: JsonField = JsonMissing.of() + private var logos: JsonField>? = null + private var phone: JsonField = JsonMissing.of() + private var slogan: JsonField = JsonMissing.of() + private var socials: JsonField>? = null + private var stock: JsonField = JsonMissing.of() + private var title: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(brand: Brand) = apply { + address = brand.address + backdrops = brand.backdrops.map { it.toMutableList() } + colors = brand.colors.map { it.toMutableList() } + description = brand.description + domain = brand.domain + email = brand.email + industries = brand.industries + isNsfw = brand.isNsfw + links = brand.links + logos = brand.logos.map { it.toMutableList() } + phone = brand.phone + slogan = brand.slogan + socials = brand.socials.map { it.toMutableList() } + stock = brand.stock + title = brand.title + additionalProperties = brand.additionalProperties.toMutableMap() + } + + /** Physical address of the brand */ + fun address(address: Address) = address(JsonField.of(address)) + + /** + * Sets [Builder.address] to an arbitrary JSON value. + * + * You should usually call [Builder.address] with a well-typed [Address] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun address(address: JsonField
) = apply { this.address = address } + + /** An array of backdrop images for the brand */ + fun backdrops(backdrops: List) = backdrops(JsonField.of(backdrops)) + + /** + * Sets [Builder.backdrops] to an arbitrary JSON value. + * + * You should usually call [Builder.backdrops] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun backdrops(backdrops: JsonField>) = apply { + this.backdrops = backdrops.map { it.toMutableList() } + } + + /** + * Adds a single [Backdrop] to [backdrops]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addBackdrop(backdrop: Backdrop) = apply { + backdrops = + (backdrops ?: JsonField.of(mutableListOf())).also { + checkKnown("backdrops", it).add(backdrop) + } + } + + /** An array of brand colors */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** A brief description of the brand */ + fun description(description: String) = description(JsonField.of(description)) + + /** + * Sets [Builder.description] to an arbitrary JSON value. + * + * You should usually call [Builder.description] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun description(description: JsonField) = apply { + this.description = description + } + + /** The domain name of the brand */ + fun domain(domain: String) = domain(JsonField.of(domain)) + + /** + * Sets [Builder.domain] to an arbitrary JSON value. + * + * You should usually call [Builder.domain] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun domain(domain: JsonField) = apply { this.domain = domain } + + /** Company email address */ + fun email(email: String) = email(JsonField.of(email)) + + /** + * Sets [Builder.email] to an arbitrary JSON value. + * + * You should usually call [Builder.email] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun email(email: JsonField) = apply { this.email = email } + + /** Industry classification information for the brand */ + fun industries(industries: Industries) = industries(JsonField.of(industries)) + + /** + * Sets [Builder.industries] to an arbitrary JSON value. + * + * You should usually call [Builder.industries] with a well-typed [Industries] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun industries(industries: JsonField) = apply { + this.industries = industries + } + + /** Indicates whether the brand content is not safe for work (NSFW) */ + fun isNsfw(isNsfw: Boolean) = isNsfw(JsonField.of(isNsfw)) + + /** + * Sets [Builder.isNsfw] to an arbitrary JSON value. + * + * You should usually call [Builder.isNsfw] with a well-typed [Boolean] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun isNsfw(isNsfw: JsonField) = apply { this.isNsfw = isNsfw } + + /** Important website links for the brand */ + fun links(links: Links) = links(JsonField.of(links)) + + /** + * Sets [Builder.links] to an arbitrary JSON value. + * + * You should usually call [Builder.links] with a well-typed [Links] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun links(links: JsonField) = apply { this.links = links } + + /** An array of logos associated with the brand */ + fun logos(logos: List) = logos(JsonField.of(logos)) + + /** + * Sets [Builder.logos] to an arbitrary JSON value. + * + * You should usually call [Builder.logos] with a well-typed `List` value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun logos(logos: JsonField>) = apply { + this.logos = logos.map { it.toMutableList() } + } + + /** + * Adds a single [Logo] to [logos]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addLogo(logo: Logo) = apply { + logos = + (logos ?: JsonField.of(mutableListOf())).also { + checkKnown("logos", it).add(logo) + } + } + + /** Company phone number */ + fun phone(phone: String) = phone(JsonField.of(phone)) + + /** + * Sets [Builder.phone] to an arbitrary JSON value. + * + * You should usually call [Builder.phone] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun phone(phone: JsonField) = apply { this.phone = phone } + + /** The brand's slogan */ + fun slogan(slogan: String) = slogan(JsonField.of(slogan)) + + /** + * Sets [Builder.slogan] to an arbitrary JSON value. + * + * You should usually call [Builder.slogan] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun slogan(slogan: JsonField) = apply { this.slogan = slogan } + + /** An array of social media links for the brand */ + fun socials(socials: List) = socials(JsonField.of(socials)) + + /** + * Sets [Builder.socials] to an arbitrary JSON value. + * + * You should usually call [Builder.socials] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun socials(socials: JsonField>) = apply { + this.socials = socials.map { it.toMutableList() } + } + + /** + * Adds a single [Social] to [socials]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addSocial(social: Social) = apply { + socials = + (socials ?: JsonField.of(mutableListOf())).also { + checkKnown("socials", it).add(social) + } + } + + /** + * Stock market information for this brand (will be null if not a publicly traded + * company) + */ + fun stock(stock: Stock) = stock(JsonField.of(stock)) + + /** + * Sets [Builder.stock] to an arbitrary JSON value. + * + * You should usually call [Builder.stock] with a well-typed [Stock] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun stock(stock: JsonField) = apply { this.stock = stock } + + /** The title or name of the brand */ + fun title(title: String) = title(JsonField.of(title)) + + /** + * Sets [Builder.title] to an arbitrary JSON value. + * + * You should usually call [Builder.title] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun title(title: JsonField) = apply { this.title = title } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Brand]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Brand = + Brand( + address, + (backdrops ?: JsonMissing.of()).map { it.toImmutable() }, + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + description, + domain, + email, + industries, + isNsfw, + links, + (logos ?: JsonMissing.of()).map { it.toImmutable() }, + phone, + slogan, + (socials ?: JsonMissing.of()).map { it.toImmutable() }, + stock, + title, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Brand = apply { + if (validated) { + return@apply + } + + address().ifPresent { it.validate() } + backdrops().ifPresent { it.forEach { it.validate() } } + colors().ifPresent { it.forEach { it.validate() } } + description() + domain() + email() + industries().ifPresent { it.validate() } + isNsfw() + links().ifPresent { it.validate() } + logos().ifPresent { it.forEach { it.validate() } } + phone() + slogan() + socials().ifPresent { it.forEach { it.validate() } } + stock().ifPresent { it.validate() } + title() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (address.asKnown().getOrNull()?.validity() ?: 0) + + (backdrops.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (description.asKnown().isPresent) 1 else 0) + + (if (domain.asKnown().isPresent) 1 else 0) + + (if (email.asKnown().isPresent) 1 else 0) + + (industries.asKnown().getOrNull()?.validity() ?: 0) + + (if (isNsfw.asKnown().isPresent) 1 else 0) + + (links.asKnown().getOrNull()?.validity() ?: 0) + + (logos.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (phone.asKnown().isPresent) 1 else 0) + + (if (slogan.asKnown().isPresent) 1 else 0) + + (socials.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (stock.asKnown().getOrNull()?.validity() ?: 0) + + (if (title.asKnown().isPresent) 1 else 0) + + /** Physical address of the brand */ + class Address + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val city: JsonField, + private val country: JsonField, + private val countryCode: JsonField, + private val postalCode: JsonField, + private val stateCode: JsonField, + private val stateProvince: JsonField, + private val street: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(), + @JsonProperty("country") + @ExcludeMissing + country: JsonField = JsonMissing.of(), + @JsonProperty("country_code") + @ExcludeMissing + countryCode: JsonField = JsonMissing.of(), + @JsonProperty("postal_code") + @ExcludeMissing + postalCode: JsonField = JsonMissing.of(), + @JsonProperty("state_code") + @ExcludeMissing + stateCode: JsonField = JsonMissing.of(), + @JsonProperty("state_province") + @ExcludeMissing + stateProvince: JsonField = JsonMissing.of(), + @JsonProperty("street") @ExcludeMissing street: JsonField = JsonMissing.of(), + ) : this( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + mutableMapOf(), + ) + + /** + * City name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun city(): Optional = city.getOptional("city") + + /** + * Country name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun country(): Optional = country.getOptional("country") + + /** + * Country code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun countryCode(): Optional = countryCode.getOptional("country_code") + + /** + * Postal or ZIP code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun postalCode(): Optional = postalCode.getOptional("postal_code") + + /** + * State or province code + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun stateCode(): Optional = stateCode.getOptional("state_code") + + /** + * State or province name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun stateProvince(): Optional = stateProvince.getOptional("state_province") + + /** + * Street address + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun street(): Optional = street.getOptional("street") + + /** + * Returns the raw JSON value of [city]. + * + * Unlike [city], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city + + /** + * Returns the raw JSON value of [country]. + * + * Unlike [country], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country + + /** + * Returns the raw JSON value of [countryCode]. + * + * Unlike [countryCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("country_code") + @ExcludeMissing + fun _countryCode(): JsonField = countryCode + + /** + * Returns the raw JSON value of [postalCode]. + * + * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("postal_code") + @ExcludeMissing + fun _postalCode(): JsonField = postalCode + + /** + * Returns the raw JSON value of [stateCode]. + * + * Unlike [stateCode], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("state_code") + @ExcludeMissing + fun _stateCode(): JsonField = stateCode + + /** + * Returns the raw JSON value of [stateProvince]. + * + * Unlike [stateProvince], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("state_province") + @ExcludeMissing + fun _stateProvince(): JsonField = stateProvince + + /** + * Returns the raw JSON value of [street]. + * + * Unlike [street], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("street") @ExcludeMissing fun _street(): JsonField = street + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Address]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Address]. */ + class Builder internal constructor() { + + private var city: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var countryCode: JsonField = JsonMissing.of() + private var postalCode: JsonField = JsonMissing.of() + private var stateCode: JsonField = JsonMissing.of() + private var stateProvince: JsonField = JsonMissing.of() + private var street: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(address: Address) = apply { + city = address.city + country = address.country + countryCode = address.countryCode + postalCode = address.postalCode + stateCode = address.stateCode + stateProvince = address.stateProvince + street = address.street + additionalProperties = address.additionalProperties.toMutableMap() + } + + /** City name */ + fun city(city: String) = city(JsonField.of(city)) + + /** + * Sets [Builder.city] to an arbitrary JSON value. + * + * You should usually call [Builder.city] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun city(city: JsonField) = apply { this.city = city } + + /** Country name */ + fun country(country: String) = country(JsonField.of(country)) + + /** + * Sets [Builder.country] to an arbitrary JSON value. + * + * You should usually call [Builder.country] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun country(country: JsonField) = apply { this.country = country } + + /** Country code */ + fun countryCode(countryCode: String) = countryCode(JsonField.of(countryCode)) + + /** + * Sets [Builder.countryCode] to an arbitrary JSON value. + * + * You should usually call [Builder.countryCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun countryCode(countryCode: JsonField) = apply { + this.countryCode = countryCode + } + + /** Postal or ZIP code */ + fun postalCode(postalCode: String) = postalCode(JsonField.of(postalCode)) + + /** + * Sets [Builder.postalCode] to an arbitrary JSON value. + * + * You should usually call [Builder.postalCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun postalCode(postalCode: JsonField) = apply { + this.postalCode = postalCode + } + + /** State or province code */ + fun stateCode(stateCode: String) = stateCode(JsonField.of(stateCode)) + + /** + * Sets [Builder.stateCode] to an arbitrary JSON value. + * + * You should usually call [Builder.stateCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun stateCode(stateCode: JsonField) = apply { this.stateCode = stateCode } + + /** State or province name */ + fun stateProvince(stateProvince: String) = + stateProvince(JsonField.of(stateProvince)) + + /** + * Sets [Builder.stateProvince] to an arbitrary JSON value. + * + * You should usually call [Builder.stateProvince] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun stateProvince(stateProvince: JsonField) = apply { + this.stateProvince = stateProvince + } + + /** Street address */ + fun street(street: String) = street(JsonField.of(street)) + + /** + * Sets [Builder.street] to an arbitrary JSON value. + * + * You should usually call [Builder.street] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun street(street: JsonField) = apply { this.street = street } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Address]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Address = + Address( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Address = apply { + if (validated) { + return@apply + } + + city() + country() + countryCode() + postalCode() + stateCode() + stateProvince() + street() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (city.asKnown().isPresent) 1 else 0) + + (if (country.asKnown().isPresent) 1 else 0) + + (if (countryCode.asKnown().isPresent) 1 else 0) + + (if (postalCode.asKnown().isPresent) 1 else 0) + + (if (stateCode.asKnown().isPresent) 1 else 0) + + (if (stateProvince.asKnown().isPresent) 1 else 0) + + (if (street.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Address && + city == other.city && + country == other.country && + countryCode == other.countryCode && + postalCode == other.postalCode && + stateCode == other.stateCode && + stateProvince == other.stateProvince && + street == other.street && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + city, + country, + countryCode, + postalCode, + stateCode, + stateProvince, + street, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Address{city=$city, country=$country, countryCode=$countryCode, postalCode=$postalCode, stateCode=$stateCode, stateProvince=$stateProvince, street=$street, additionalProperties=$additionalProperties}" + } + + class Backdrop + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val colors: JsonField>, + private val resolution: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("resolution") + @ExcludeMissing + resolution: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(colors, resolution, url, mutableMapOf()) + + /** + * Array of colors in the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * Resolution of the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun resolution(): Optional = resolution.getOptional("resolution") + + /** + * URL of the backdrop image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [resolution]. + * + * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("resolution") + @ExcludeMissing + fun _resolution(): JsonField = resolution + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Backdrop]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Backdrop]. */ + class Builder internal constructor() { + + private var colors: JsonField>? = null + private var resolution: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(backdrop: Backdrop) = apply { + colors = backdrop.colors.map { it.toMutableList() } + resolution = backdrop.resolution + url = backdrop.url + additionalProperties = backdrop.additionalProperties.toMutableMap() + } + + /** Array of colors in the backdrop image */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** Resolution of the backdrop image */ + fun resolution(resolution: Resolution) = resolution(JsonField.of(resolution)) + + /** + * Sets [Builder.resolution] to an arbitrary JSON value. + * + * You should usually call [Builder.resolution] with a well-typed [Resolution] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun resolution(resolution: JsonField) = apply { + this.resolution = resolution + } + + /** URL of the backdrop image */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Backdrop]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Backdrop = + Backdrop( + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + resolution, + url, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Backdrop = apply { + if (validated) { + return@apply + } + + colors().ifPresent { it.forEach { it.validate() } } + resolution().ifPresent { it.validate() } + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (if (url.asKnown().isPresent) 1 else 0) + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** Resolution of the backdrop image */ + class Resolution + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val aspectRatio: JsonField, + private val height: JsonField, + private val width: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("aspect_ratio") + @ExcludeMissing + aspectRatio: JsonField = JsonMissing.of(), + @JsonProperty("height") + @ExcludeMissing + height: JsonField = JsonMissing.of(), + @JsonProperty("width") @ExcludeMissing width: JsonField = JsonMissing.of(), + ) : this(aspectRatio, height, width, mutableMapOf()) + + /** + * Aspect ratio of the image (width/height) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun aspectRatio(): Optional = aspectRatio.getOptional("aspect_ratio") + + /** + * Height of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun height(): Optional = height.getOptional("height") + + /** + * Width of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun width(): Optional = width.getOptional("width") + + /** + * Returns the raw JSON value of [aspectRatio]. + * + * Unlike [aspectRatio], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("aspect_ratio") + @ExcludeMissing + fun _aspectRatio(): JsonField = aspectRatio + + /** + * Returns the raw JSON value of [height]. + * + * Unlike [height], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("height") @ExcludeMissing fun _height(): JsonField = height + + /** + * Returns the raw JSON value of [width]. + * + * Unlike [width], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("width") @ExcludeMissing fun _width(): JsonField = width + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Resolution]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Resolution]. */ + class Builder internal constructor() { + + private var aspectRatio: JsonField = JsonMissing.of() + private var height: JsonField = JsonMissing.of() + private var width: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(resolution: Resolution) = apply { + aspectRatio = resolution.aspectRatio + height = resolution.height + width = resolution.width + additionalProperties = resolution.additionalProperties.toMutableMap() + } + + /** Aspect ratio of the image (width/height) */ + fun aspectRatio(aspectRatio: Double) = aspectRatio(JsonField.of(aspectRatio)) + + /** + * Sets [Builder.aspectRatio] to an arbitrary JSON value. + * + * You should usually call [Builder.aspectRatio] with a well-typed [Double] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun aspectRatio(aspectRatio: JsonField) = apply { + this.aspectRatio = aspectRatio + } + + /** Height of the image in pixels */ + fun height(height: Long) = height(JsonField.of(height)) + + /** + * Sets [Builder.height] to an arbitrary JSON value. + * + * You should usually call [Builder.height] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun height(height: JsonField) = apply { this.height = height } + + /** Width of the image in pixels */ + fun width(width: Long) = width(JsonField.of(width)) + + /** + * Sets [Builder.width] to an arbitrary JSON value. + * + * You should usually call [Builder.width] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun width(width: JsonField) = apply { this.width = width } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Resolution]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Resolution = + Resolution(aspectRatio, height, width, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Resolution = apply { + if (validated) { + return@apply + } + + aspectRatio() + height() + width() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (aspectRatio.asKnown().isPresent) 1 else 0) + + (if (height.asKnown().isPresent) 1 else 0) + + (if (width.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Resolution && + aspectRatio == other.aspectRatio && + height == other.height && + width == other.width && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(aspectRatio, height, width, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Resolution{aspectRatio=$aspectRatio, height=$height, width=$width, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Backdrop && + colors == other.colors && + resolution == other.resolution && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(colors, resolution, url, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Backdrop{colors=$colors, resolution=$resolution, url=$url, additionalProperties=$additionalProperties}" + } + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** Industry classification information for the brand */ + class Industries + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val eic: JsonField>, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("eic") @ExcludeMissing eic: JsonField> = JsonMissing.of() + ) : this(eic, mutableMapOf()) + + /** + * Easy Industry Classification - array of industry and subindustry pairs + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun eic(): Optional> = eic.getOptional("eic") + + /** + * Returns the raw JSON value of [eic]. + * + * Unlike [eic], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("eic") @ExcludeMissing fun _eic(): JsonField> = eic + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Industries]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Industries]. */ + class Builder internal constructor() { + + private var eic: JsonField>? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(industries: Industries) = apply { + eic = industries.eic.map { it.toMutableList() } + additionalProperties = industries.additionalProperties.toMutableMap() + } + + /** Easy Industry Classification - array of industry and subindustry pairs */ + fun eic(eic: List) = eic(JsonField.of(eic)) + + /** + * Sets [Builder.eic] to an arbitrary JSON value. + * + * You should usually call [Builder.eic] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun eic(eic: JsonField>) = apply { + this.eic = eic.map { it.toMutableList() } + } + + /** + * Adds a single [Eic] to [Builder.eic]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addEic(eic: Eic) = apply { + this.eic = + (this.eic ?: JsonField.of(mutableListOf())).also { + checkKnown("eic", it).add(eic) + } + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Industries]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Industries = + Industries( + (eic ?: JsonMissing.of()).map { it.toImmutable() }, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Industries = apply { + if (validated) { + return@apply + } + + eic().ifPresent { it.forEach { it.validate() } } + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (eic.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + class Eic + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val industry: JsonField, + private val subindustry: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("industry") + @ExcludeMissing + industry: JsonField = JsonMissing.of(), + @JsonProperty("subindustry") + @ExcludeMissing + subindustry: JsonField = JsonMissing.of(), + ) : this(industry, subindustry, mutableMapOf()) + + /** + * Industry classification enum + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun industry(): Industry = industry.getRequired("industry") + + /** + * Subindustry classification enum + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun subindustry(): Subindustry = subindustry.getRequired("subindustry") + + /** + * Returns the raw JSON value of [industry]. + * + * Unlike [industry], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("industry") + @ExcludeMissing + fun _industry(): JsonField = industry + + /** + * Returns the raw JSON value of [subindustry]. + * + * Unlike [subindustry], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("subindustry") + @ExcludeMissing + fun _subindustry(): JsonField = subindustry + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [Eic]. + * + * The following fields are required: + * ```java + * .industry() + * .subindustry() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Eic]. */ + class Builder internal constructor() { + + private var industry: JsonField? = null + private var subindustry: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(eic: Eic) = apply { + industry = eic.industry + subindustry = eic.subindustry + additionalProperties = eic.additionalProperties.toMutableMap() + } + + /** Industry classification enum */ + fun industry(industry: Industry) = industry(JsonField.of(industry)) + + /** + * Sets [Builder.industry] to an arbitrary JSON value. + * + * You should usually call [Builder.industry] with a well-typed [Industry] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun industry(industry: JsonField) = apply { this.industry = industry } + + /** Subindustry classification enum */ + fun subindustry(subindustry: Subindustry) = + subindustry(JsonField.of(subindustry)) + + /** + * Sets [Builder.subindustry] to an arbitrary JSON value. + * + * You should usually call [Builder.subindustry] with a well-typed [Subindustry] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun subindustry(subindustry: JsonField) = apply { + this.subindustry = subindustry + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Eic]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .industry() + * .subindustry() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): Eic = + Eic( + checkRequired("industry", industry), + checkRequired("subindustry", subindustry), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Eic = apply { + if (validated) { + return@apply + } + + industry().validate() + subindustry().validate() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (industry.asKnown().getOrNull()?.validity() ?: 0) + + (subindustry.asKnown().getOrNull()?.validity() ?: 0) + + /** Industry classification enum */ + class Industry + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue + fun _value(): JsonField = value + + companion object { + + @JvmField val AEROSPACE_DEFENSE = of("Aerospace & Defense") + + @JvmField val TECHNOLOGY = of("Technology") + + @JvmField val FINANCE = of("Finance") + + @JvmField val HEALTHCARE = of("Healthcare") + + @JvmField val RETAIL_E_COMMERCE = of("Retail & E-commerce") + + @JvmField val ENTERTAINMENT = of("Entertainment") + + @JvmField val EDUCATION = of("Education") + + @JvmField val GOVERNMENT_NONPROFIT = of("Government & Nonprofit") + + @JvmField val INDUSTRIAL_ENERGY = of("Industrial & Energy") + + @JvmField val AUTOMOTIVE_TRANSPORTATION = of("Automotive & Transportation") + + @JvmField val LIFESTYLE_LEISURE = of("Lifestyle & Leisure") + + @JvmField val LUXURY_FASHION = of("Luxury & Fashion") + + @JvmField val NEWS_MEDIA = of("News & Media") + + @JvmField val SPORTS = of("Sports") + + @JvmField val REAL_ESTATE_PROP_TECH = of("Real Estate & PropTech") + + @JvmField val LEGAL_COMPLIANCE = of("Legal & Compliance") + + @JvmField val TELECOMMUNICATIONS = of("Telecommunications") + + @JvmField val AGRICULTURE_FOOD = of("Agriculture & Food") + + @JvmField + val PROFESSIONAL_SERVICES_AGENCIES = of("Professional Services & Agencies") + + @JvmField val CHEMICALS_MATERIALS = of("Chemicals & Materials") + + @JvmField val LOGISTICS_SUPPLY_CHAIN = of("Logistics & Supply Chain") + + @JvmField val HOSPITALITY_TOURISM = of("Hospitality & Tourism") + + @JvmField + val CONSTRUCTION_BUILT_ENVIRONMENT = of("Construction & Built Environment") + + @JvmField + val CONSUMER_PACKAGED_GOODS_CPG = of("Consumer Packaged Goods (CPG)") + + @JvmStatic fun of(value: String) = Industry(JsonField.of(value)) + } + + /** An enum containing [Industry]'s known values. */ + enum class Known { + AEROSPACE_DEFENSE, + TECHNOLOGY, + FINANCE, + HEALTHCARE, + RETAIL_E_COMMERCE, + ENTERTAINMENT, + EDUCATION, + GOVERNMENT_NONPROFIT, + INDUSTRIAL_ENERGY, + AUTOMOTIVE_TRANSPORTATION, + LIFESTYLE_LEISURE, + LUXURY_FASHION, + NEWS_MEDIA, + SPORTS, + REAL_ESTATE_PROP_TECH, + LEGAL_COMPLIANCE, + TELECOMMUNICATIONS, + AGRICULTURE_FOOD, + PROFESSIONAL_SERVICES_AGENCIES, + CHEMICALS_MATERIALS, + LOGISTICS_SUPPLY_CHAIN, + HOSPITALITY_TOURISM, + CONSTRUCTION_BUILT_ENVIRONMENT, + CONSUMER_PACKAGED_GOODS_CPG, + } + + /** + * An enum containing [Industry]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [Industry] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For + * example, if the SDK is on an older version than the API, then the API may + * respond with new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + AEROSPACE_DEFENSE, + TECHNOLOGY, + FINANCE, + HEALTHCARE, + RETAIL_E_COMMERCE, + ENTERTAINMENT, + EDUCATION, + GOVERNMENT_NONPROFIT, + INDUSTRIAL_ENERGY, + AUTOMOTIVE_TRANSPORTATION, + LIFESTYLE_LEISURE, + LUXURY_FASHION, + NEWS_MEDIA, + SPORTS, + REAL_ESTATE_PROP_TECH, + LEGAL_COMPLIANCE, + TELECOMMUNICATIONS, + AGRICULTURE_FOOD, + PROFESSIONAL_SERVICES_AGENCIES, + CHEMICALS_MATERIALS, + LOGISTICS_SUPPLY_CHAIN, + HOSPITALITY_TOURISM, + CONSTRUCTION_BUILT_ENVIRONMENT, + CONSUMER_PACKAGED_GOODS_CPG, + /** + * An enum member indicating that [Industry] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or + * if you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + AEROSPACE_DEFENSE -> Value.AEROSPACE_DEFENSE + TECHNOLOGY -> Value.TECHNOLOGY + FINANCE -> Value.FINANCE + HEALTHCARE -> Value.HEALTHCARE + RETAIL_E_COMMERCE -> Value.RETAIL_E_COMMERCE + ENTERTAINMENT -> Value.ENTERTAINMENT + EDUCATION -> Value.EDUCATION + GOVERNMENT_NONPROFIT -> Value.GOVERNMENT_NONPROFIT + INDUSTRIAL_ENERGY -> Value.INDUSTRIAL_ENERGY + AUTOMOTIVE_TRANSPORTATION -> Value.AUTOMOTIVE_TRANSPORTATION + LIFESTYLE_LEISURE -> Value.LIFESTYLE_LEISURE + LUXURY_FASHION -> Value.LUXURY_FASHION + NEWS_MEDIA -> Value.NEWS_MEDIA + SPORTS -> Value.SPORTS + REAL_ESTATE_PROP_TECH -> Value.REAL_ESTATE_PROP_TECH + LEGAL_COMPLIANCE -> Value.LEGAL_COMPLIANCE + TELECOMMUNICATIONS -> Value.TELECOMMUNICATIONS + AGRICULTURE_FOOD -> Value.AGRICULTURE_FOOD + PROFESSIONAL_SERVICES_AGENCIES -> Value.PROFESSIONAL_SERVICES_AGENCIES + CHEMICALS_MATERIALS -> Value.CHEMICALS_MATERIALS + LOGISTICS_SUPPLY_CHAIN -> Value.LOGISTICS_SUPPLY_CHAIN + HOSPITALITY_TOURISM -> Value.HOSPITALITY_TOURISM + CONSTRUCTION_BUILT_ENVIRONMENT -> Value.CONSTRUCTION_BUILT_ENVIRONMENT + CONSUMER_PACKAGED_GOODS_CPG -> Value.CONSUMER_PACKAGED_GOODS_CPG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known + * and don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not + * a known member. + */ + fun known(): Known = + when (this) { + AEROSPACE_DEFENSE -> Known.AEROSPACE_DEFENSE + TECHNOLOGY -> Known.TECHNOLOGY + FINANCE -> Known.FINANCE + HEALTHCARE -> Known.HEALTHCARE + RETAIL_E_COMMERCE -> Known.RETAIL_E_COMMERCE + ENTERTAINMENT -> Known.ENTERTAINMENT + EDUCATION -> Known.EDUCATION + GOVERNMENT_NONPROFIT -> Known.GOVERNMENT_NONPROFIT + INDUSTRIAL_ENERGY -> Known.INDUSTRIAL_ENERGY + AUTOMOTIVE_TRANSPORTATION -> Known.AUTOMOTIVE_TRANSPORTATION + LIFESTYLE_LEISURE -> Known.LIFESTYLE_LEISURE + LUXURY_FASHION -> Known.LUXURY_FASHION + NEWS_MEDIA -> Known.NEWS_MEDIA + SPORTS -> Known.SPORTS + REAL_ESTATE_PROP_TECH -> Known.REAL_ESTATE_PROP_TECH + LEGAL_COMPLIANCE -> Known.LEGAL_COMPLIANCE + TELECOMMUNICATIONS -> Known.TELECOMMUNICATIONS + AGRICULTURE_FOOD -> Known.AGRICULTURE_FOOD + PROFESSIONAL_SERVICES_AGENCIES -> Known.PROFESSIONAL_SERVICES_AGENCIES + CHEMICALS_MATERIALS -> Known.CHEMICALS_MATERIALS + LOGISTICS_SUPPLY_CHAIN -> Known.LOGISTICS_SUPPLY_CHAIN + HOSPITALITY_TOURISM -> Known.HOSPITALITY_TOURISM + CONSTRUCTION_BUILT_ENVIRONMENT -> Known.CONSTRUCTION_BUILT_ENVIRONMENT + CONSUMER_PACKAGED_GOODS_CPG -> Known.CONSUMER_PACKAGED_GOODS_CPG + else -> throw BrandDevInvalidDataException("Unknown Industry: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not + * have the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Industry = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Industry && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** Subindustry classification enum */ + class Subindustry + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue + fun _value(): JsonField = value + + companion object { + + @JvmField + val DEFENSE_SYSTEMS_MILITARY_HARDWARE = + of("Defense Systems & Military Hardware") + + @JvmField val AEROSPACE_MANUFACTURING = of("Aerospace Manufacturing") + + @JvmField + val AVIONICS_NAVIGATION_TECHNOLOGY = of("Avionics & Navigation Technology") + + @JvmField + val SUBSEA_NAVAL_DEFENSE_SYSTEMS = of("Subsea & Naval Defense Systems") + + @JvmField + val SPACE_SATELLITE_TECHNOLOGY = of("Space & Satellite Technology") + + @JvmField + val DEFENSE_IT_SYSTEMS_INTEGRATION = of("Defense IT & Systems Integration") + + @JvmField val SOFTWARE_B2_B = of("Software (B2B)") + + @JvmField val SOFTWARE_B2_C = of("Software (B2C)") + + @JvmField + val CLOUD_INFRASTRUCTURE_DEV_OPS = of("Cloud Infrastructure & DevOps") + + @JvmField val CYBERSECURITY = of("Cybersecurity") + + @JvmField + val ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING = + of("Artificial Intelligence & Machine Learning") + + @JvmField + val DATA_INFRASTRUCTURE_ANALYTICS = of("Data Infrastructure & Analytics") + + @JvmField val HARDWARE_SEMICONDUCTORS = of("Hardware & Semiconductors") + + @JvmField val FINTECH_INFRASTRUCTURE = of("Fintech Infrastructure") + + @JvmField + val E_COMMERCE_MARKETPLACE_PLATFORMS = + of("eCommerce & Marketplace Platforms") + + @JvmField val DEVELOPER_TOOLS_APIS = of("Developer Tools & APIs") + + @JvmField val WEB3_BLOCKCHAIN = of("Web3 & Blockchain") + + @JvmField val XR_SPATIAL_COMPUTING = of("XR & Spatial Computing") + + @JvmField val BANKING_LENDING = of("Banking & Lending") + + @JvmField + val INVESTMENT_MANAGEMENT_WEALTH_TECH = + of("Investment Management & WealthTech") + + @JvmField val INSURANCE_INSUR_TECH = of("Insurance & InsurTech") + + @JvmField val PAYMENTS_MONEY_MOVEMENT = of("Payments & Money Movement") + + @JvmField + val ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS = + of("Accounting, Tax & Financial Planning Tools") + + @JvmField + val CAPITAL_MARKETS_TRADING_PLATFORMS = + of("Capital Markets & Trading Platforms") + + @JvmField + val FINANCIAL_INFRASTRUCTURE_APIS = of("Financial Infrastructure & APIs") + + @JvmField + val CREDIT_SCORING_RISK_MANAGEMENT = of("Credit Scoring & Risk Management") + + @JvmField + val CRYPTOCURRENCY_DIGITAL_ASSETS = of("Cryptocurrency & Digital Assets") + + @JvmField + val BNPL_ALTERNATIVE_FINANCING = of("BNPL & Alternative Financing") + + @JvmField + val HEALTHCARE_PROVIDERS_SERVICES = of("Healthcare Providers & Services") + + @JvmField + val PHARMACEUTICALS_DRUG_DEVELOPMENT = + of("Pharmaceuticals & Drug Development") + + @JvmField + val MEDICAL_DEVICES_DIAGNOSTICS = of("Medical Devices & Diagnostics") + + @JvmField val BIOTECHNOLOGY_GENOMICS = of("Biotechnology & Genomics") + + @JvmField + val DIGITAL_HEALTH_TELEMEDICINE = of("Digital Health & Telemedicine") + + @JvmField + val HEALTH_INSURANCE_BENEFITS_TECH = of("Health Insurance & Benefits Tech") + + @JvmField + val CLINICAL_TRIALS_RESEARCH_PLATFORMS = + of("Clinical Trials & Research Platforms") + + @JvmField val MENTAL_HEALTH_WELLNESS = of("Mental Health & Wellness") + + @JvmField val HEALTHCARE_IT_EHR_SYSTEMS = of("Healthcare IT & EHR Systems") + + @JvmField + val CONSUMER_HEALTH_WELLNESS_PRODUCTS = + of("Consumer Health & Wellness Products") + + @JvmField val ONLINE_MARKETPLACES = of("Online Marketplaces") + + @JvmField + val DIRECT_TO_CONSUMER_DTC_BRANDS = of("Direct-to-Consumer (DTC) Brands") + + @JvmField + val RETAIL_TECH_POINT_OF_SALE_SYSTEMS = + of("Retail Tech & Point-of-Sale Systems") + + @JvmField + val OMNICHANNEL_IN_STORE_RETAIL = of("Omnichannel & In-Store Retail") + + @JvmField + val E_COMMERCE_ENABLEMENT_INFRASTRUCTURE = + of("E-commerce Enablement & Infrastructure") + + @JvmField + val SUBSCRIPTION_MEMBERSHIP_COMMERCE = + of("Subscription & Membership Commerce") + + @JvmField + val SOCIAL_COMMERCE_INFLUENCER_PLATFORMS = + of("Social Commerce & Influencer Platforms") + + @JvmField val FASHION_APPAREL_RETAIL = of("Fashion & Apparel Retail") + + @JvmField + val FOOD_BEVERAGE_GROCERY_E_COMMERCE = + of("Food, Beverage & Grocery E-commerce") + + @JvmField + val STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO = + of("Streaming Platforms (Video, Music, Audio)") + + @JvmField + val GAMING_INTERACTIVE_ENTERTAINMENT = + of("Gaming & Interactive Entertainment") + + @JvmField + val CREATOR_ECONOMY_INFLUENCER_PLATFORMS = + of("Creator Economy & Influencer Platforms") + + @JvmField + val ADVERTISING_ADTECH_MEDIA_BUYING = + of("Advertising, Adtech & Media Buying") + + @JvmField + val FILM_TV_PRODUCTION_STUDIOS = of("Film, TV & Production Studios") + + @JvmField + val EVENTS_VENUES_LIVE_ENTERTAINMENT = + of("Events, Venues & Live Entertainment") + + @JvmField + val VIRTUAL_WORLDS_METAVERSE_EXPERIENCES = + of("Virtual Worlds & Metaverse Experiences") + + @JvmField + val K_12_EDUCATION_PLATFORMS_TOOLS = of("K-12 Education Platforms & Tools") + + @JvmField + val HIGHER_EDUCATION_UNIVERSITY_TECH = + of("Higher Education & University Tech") + + @JvmField val ONLINE_LEARNING_MOO_CS = of("Online Learning & MOOCs") + + @JvmField val TEST_PREP_CERTIFICATION = of("Test Prep & Certification") + + @JvmField + val CORPORATE_TRAINING_UPSKILLING = of("Corporate Training & Upskilling") + + @JvmField + val TUTORING_SUPPLEMENTAL_LEARNING = of("Tutoring & Supplemental Learning") + + @JvmField + val EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS = + of("Education Management Systems (LMS/SIS)") + + @JvmField val LANGUAGE_LEARNING = of("Language Learning") + + @JvmField + val CREATOR_LED_COHORT_BASED_COURSES = + of("Creator-Led & Cohort-Based Courses") + + @JvmField + val SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS = + of("Special Education & Accessibility Tools") + + @JvmField + val GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES = + of("Government Technology & Digital Services") + + @JvmField + val CIVIC_ENGAGEMENT_POLICY_PLATFORMS = + of("Civic Engagement & Policy Platforms") + + @JvmField + val INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID = + of("International Development & Humanitarian Aid") + + @JvmField val PHILANTHROPY_GRANTMAKING = of("Philanthropy & Grantmaking") + + @JvmField + val NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS = + of("Nonprofit Operations & Fundraising Tools") + + @JvmField + val PUBLIC_HEALTH_SOCIAL_SERVICES = of("Public Health & Social Services") + + @JvmField + val EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS = + of("Education & Youth Development Programs") + + @JvmField + val ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS = + of("Environmental & Climate Action Organizations") + + @JvmField + val LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY = + of("Legal Aid & Social Justice Advocacy") + + @JvmField + val MUNICIPAL_INFRASTRUCTURE_SERVICES = + of("Municipal & Infrastructure Services") + + @JvmField + val MANUFACTURING_INDUSTRIAL_AUTOMATION = + of("Manufacturing & Industrial Automation") + + @JvmField + val ENERGY_PRODUCTION_OIL_GAS_NUCLEAR = + of("Energy Production (Oil, Gas, Nuclear)") + + @JvmField + val RENEWABLE_ENERGY_CLEANTECH = of("Renewable Energy & Cleantech") + + @JvmField + val UTILITIES_GRID_INFRASTRUCTURE = of("Utilities & Grid Infrastructure") + + @JvmField + val INDUSTRIAL_IO_T_MONITORING_SYSTEMS = + of("Industrial IoT & Monitoring Systems") + + @JvmField + val CONSTRUCTION_HEAVY_EQUIPMENT = of("Construction & Heavy Equipment") + + @JvmField val MINING_NATURAL_RESOURCES = of("Mining & Natural Resources") + + @JvmField + val ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY = + of("Environmental Engineering & Sustainability") + + @JvmField + val ENERGY_STORAGE_BATTERY_TECHNOLOGY = + of("Energy Storage & Battery Technology") + + @JvmField + val AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING = + of("Automotive OEMs & Vehicle Manufacturing") + + @JvmField + val ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE = + of("Electric Vehicles (EVs) & Charging Infrastructure") + + @JvmField + val MOBILITY_AS_A_SERVICE_MAA_S = of("Mobility-as-a-Service (MaaS)") + + @JvmField val FLEET_MANAGEMENT = of("Fleet Management") + + @JvmField + val PUBLIC_TRANSIT_URBAN_MOBILITY = of("Public Transit & Urban Mobility") + + @JvmField val AUTONOMOUS_VEHICLES_ADAS = of("Autonomous Vehicles & ADAS") + + @JvmField + val AFTERMARKET_PARTS_SERVICES = of("Aftermarket Parts & Services") + + @JvmField + val TELEMATICS_VEHICLE_CONNECTIVITY = + of("Telematics & Vehicle Connectivity") + + @JvmField + val AVIATION_AEROSPACE_TRANSPORT = of("Aviation & Aerospace Transport") + + @JvmField val MARITIME_SHIPPING = of("Maritime Shipping") + + @JvmField val FITNESS_WELLNESS = of("Fitness & Wellness") + + @JvmField val BEAUTY_PERSONAL_CARE = of("Beauty & Personal Care") + + @JvmField val HOME_LIVING = of("Home & Living") + + @JvmField val DATING_RELATIONSHIPS = of("Dating & Relationships") + + @JvmField val HOBBIES_CRAFTS_DIY = of("Hobbies, Crafts & DIY") + + @JvmField val OUTDOOR_RECREATIONAL_GEAR = of("Outdoor & Recreational Gear") + + @JvmField + val EVENTS_EXPERIENCES_TICKETING_PLATFORMS = + of("Events, Experiences & Ticketing Platforms") + + @JvmField val DESIGNER_LUXURY_APPAREL = of("Designer & Luxury Apparel") + + @JvmField + val ACCESSORIES_JEWELRY_WATCHES = of("Accessories, Jewelry & Watches") + + @JvmField val FOOTWEAR_LEATHER_GOODS = of("Footwear & Leather Goods") + + @JvmField val BEAUTY_FRAGRANCE_SKINCARE = of("Beauty, Fragrance & Skincare") + + @JvmField + val FASHION_MARKETPLACES_RETAIL_PLATFORMS = + of("Fashion Marketplaces & Retail Platforms") + + @JvmField + val SUSTAINABLE_ETHICAL_FASHION = of("Sustainable & Ethical Fashion") + + @JvmField + val RESALE_VINTAGE_CIRCULAR_FASHION = + of("Resale, Vintage & Circular Fashion") + + @JvmField + val FASHION_TECH_VIRTUAL_TRY_ONS = of("Fashion Tech & Virtual Try-Ons") + + @JvmField + val STREETWEAR_EMERGING_LUXURY = of("Streetwear & Emerging Luxury") + + @JvmField val COUTURE_MADE_TO_MEASURE = of("Couture & Made-to-Measure") + + @JvmField + val NEWS_PUBLISHING_JOURNALISM = of("News Publishing & Journalism") + + @JvmField + val DIGITAL_MEDIA_CONTENT_PLATFORMS = + of("Digital Media & Content Platforms") + + @JvmField val BROADCASTING_TV_RADIO = of("Broadcasting (TV & Radio)") + + @JvmField val PODCASTING_AUDIO_MEDIA = of("Podcasting & Audio Media") + + @JvmField + val NEWS_AGGREGATORS_CURATION_TOOLS = + of("News Aggregators & Curation Tools") + + @JvmField + val INDEPENDENT_CREATOR_LED_MEDIA = of("Independent & Creator-Led Media") + + @JvmField + val NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS = + of("Newsletters & Substack-Style Platforms") + + @JvmField + val POLITICAL_INVESTIGATIVE_MEDIA = of("Political & Investigative Media") + + @JvmField val TRADE_NICHE_PUBLICATIONS = of("Trade & Niche Publications") + + @JvmField + val MEDIA_MONITORING_ANALYTICS = of("Media Monitoring & Analytics") + + @JvmField + val PROFESSIONAL_TEAMS_LEAGUES = of("Professional Teams & Leagues") + + @JvmField val SPORTS_MEDIA_BROADCASTING = of("Sports Media & Broadcasting") + + @JvmField + val SPORTS_BETTING_FANTASY_SPORTS = of("Sports Betting & Fantasy Sports") + + @JvmField + val FITNESS_ATHLETIC_TRAINING_PLATFORMS = + of("Fitness & Athletic Training Platforms") + + @JvmField val SPORTSWEAR_EQUIPMENT = of("Sportswear & Equipment") + + @JvmField + val ESPORTS_COMPETITIVE_GAMING = of("Esports & Competitive Gaming") + + @JvmField + val SPORTS_VENUES_EVENT_MANAGEMENT = of("Sports Venues & Event Management") + + @JvmField + val ATHLETE_MANAGEMENT_TALENT_AGENCIES = + of("Athlete Management & Talent Agencies") + + @JvmField + val SPORTS_TECH_PERFORMANCE_ANALYTICS = + of("Sports Tech & Performance Analytics") + + @JvmField + val YOUTH_AMATEUR_COLLEGIATE_SPORTS = + of("Youth, Amateur & Collegiate Sports") + + @JvmField val REAL_ESTATE_MARKETPLACES = of("Real Estate Marketplaces") + + @JvmField + val PROPERTY_MANAGEMENT_SOFTWARE = of("Property Management Software") + + @JvmField val RENTAL_PLATFORMS = of("Rental Platforms") + + @JvmField val MORTGAGE_LENDING_TECH = of("Mortgage & Lending Tech") + + @JvmField + val REAL_ESTATE_INVESTMENT_PLATFORMS = + of("Real Estate Investment Platforms") + + @JvmField val LAW_FIRMS_LEGAL_SERVICES = of("Law Firms & Legal Services") + + @JvmField val LEGAL_TECH_AUTOMATION = of("Legal Tech & Automation") + + @JvmField val REGULATORY_COMPLIANCE = of("Regulatory Compliance") + + @JvmField + val E_DISCOVERY_LITIGATION_TOOLS = of("E-Discovery & Litigation Tools") + + @JvmField val CONTRACT_MANAGEMENT = of("Contract Management") + + @JvmField + val GOVERNANCE_RISK_COMPLIANCE_GRC = + of("Governance, Risk & Compliance (GRC)") + + @JvmField val IP_TRADEMARK_MANAGEMENT = of("IP & Trademark Management") + + @JvmField + val LEGAL_RESEARCH_INTELLIGENCE = of("Legal Research & Intelligence") + + @JvmField + val COMPLIANCE_TRAINING_CERTIFICATION = + of("Compliance Training & Certification") + + @JvmField + val WHISTLEBLOWER_ETHICS_REPORTING = of("Whistleblower & Ethics Reporting") + + @JvmField + val MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G = + of("Mobile & Wireless Networks (3G/4G/5G)") + + @JvmField val BROADBAND_FIBER_INTERNET = of("Broadband & Fiber Internet") + + @JvmField + val SATELLITE_SPACE_BASED_COMMUNICATIONS = + of("Satellite & Space-Based Communications") + + @JvmField + val NETWORK_EQUIPMENT_INFRASTRUCTURE = + of("Network Equipment & Infrastructure") + + @JvmField + val TELECOM_BILLING_OSS_BSS_SYSTEMS = + of("Telecom Billing & OSS/BSS Systems") + + @JvmField + val VO_IP_UNIFIED_COMMUNICATIONS = of("VoIP & Unified Communications") + + @JvmField + val INTERNET_SERVICE_PROVIDERS_IS_PS = + of("Internet Service Providers (ISPs)") + + @JvmField + val EDGE_COMPUTING_NETWORK_VIRTUALIZATION = + of("Edge Computing & Network Virtualization") + + @JvmField val IO_T_CONNECTIVITY_PLATFORMS = of("IoT Connectivity Platforms") + + @JvmField + val PRECISION_AGRICULTURE_AG_TECH = of("Precision Agriculture & AgTech") + + @JvmField val CROP_LIVESTOCK_PRODUCTION = of("Crop & Livestock Production") + + @JvmField + val FOOD_BEVERAGE_MANUFACTURING_PROCESSING = + of("Food & Beverage Manufacturing & Processing") + + @JvmField val FOOD_DISTRIBUTION = of("Food Distribution") + + @JvmField val RESTAURANTS_FOOD_SERVICE = of("Restaurants & Food Service") + + @JvmField + val AGRICULTURAL_INPUTS_EQUIPMENT = of("Agricultural Inputs & Equipment") + + @JvmField + val SUSTAINABLE_REGENERATIVE_AGRICULTURE = + of("Sustainable & Regenerative Agriculture") + + @JvmField val SEAFOOD_AQUACULTURE = of("Seafood & Aquaculture") + + @JvmField val MANAGEMENT_CONSULTING = of("Management Consulting") + + @JvmField + val MARKETING_ADVERTISING_AGENCIES = of("Marketing & Advertising Agencies") + + @JvmField + val DESIGN_BRANDING_CREATIVE_STUDIOS = + of("Design, Branding & Creative Studios") + + @JvmField + val IT_SERVICES_MANAGED_SERVICES = of("IT Services & Managed Services") + + @JvmField + val STAFFING_RECRUITING_TALENT = of("Staffing, Recruiting & Talent") + + @JvmField val ACCOUNTING_TAX_FIRMS = of("Accounting & Tax Firms") + + @JvmField + val PUBLIC_RELATIONS_COMMUNICATIONS = + of("Public Relations & Communications") + + @JvmField + val BUSINESS_PROCESS_OUTSOURCING_BPO = + of("Business Process Outsourcing (BPO)") + + @JvmField + val PROFESSIONAL_TRAINING_COACHING = of("Professional Training & Coaching") + + @JvmField val SPECIALTY_CHEMICALS = of("Specialty Chemicals") + + @JvmField val COMMODITY_PETROCHEMICALS = of("Commodity & Petrochemicals") + + @JvmField val POLYMERS_PLASTICS_RUBBER = of("Polymers, Plastics & Rubber") + + @JvmField + val COATINGS_ADHESIVES_SEALANTS = of("Coatings, Adhesives & Sealants") + + @JvmField val INDUSTRIAL_GASES = of("Industrial Gases") + + @JvmField + val ADVANCED_MATERIALS_COMPOSITES = of("Advanced Materials & Composites") + + @JvmField + val BATTERY_MATERIALS_ENERGY_STORAGE = + of("Battery Materials & Energy Storage") + + @JvmField + val ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS = + of("Electronic Materials & Semiconductor Chemicals") + + @JvmField val AGROCHEMICALS_FERTILIZERS = of("Agrochemicals & Fertilizers") + + @JvmField + val FREIGHT_TRANSPORTATION_TECH = of("Freight & Transportation Tech") + + @JvmField val LAST_MILE_DELIVERY = of("Last-Mile Delivery") + + @JvmField val WAREHOUSE_AUTOMATION = of("Warehouse Automation") + + @JvmField + val SUPPLY_CHAIN_VISIBILITY_PLATFORMS = + of("Supply Chain Visibility Platforms") + + @JvmField val LOGISTICS_MARKETPLACES = of("Logistics Marketplaces") + + @JvmField + val SHIPPING_FREIGHT_FORWARDING = of("Shipping & Freight Forwarding") + + @JvmField val COLD_CHAIN_LOGISTICS = of("Cold Chain Logistics") + + @JvmField val REVERSE_LOGISTICS_RETURNS = of("Reverse Logistics & Returns") + + @JvmField val CROSS_BORDER_TRADE_TECH = of("Cross-Border Trade Tech") + + @JvmField + val TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS = + of("Transportation Management Systems (TMS)") + + @JvmField val HOTELS_ACCOMMODATION = of("Hotels & Accommodation") + + @JvmField + val VACATION_RENTALS_SHORT_TERM_STAYS = + of("Vacation Rentals & Short-Term Stays") + + @JvmField + val RESTAURANT_TECH_MANAGEMENT = of("Restaurant Tech & Management") + + @JvmField val TRAVEL_BOOKING_PLATFORMS = of("Travel Booking Platforms") + + @JvmField + val TOURISM_EXPERIENCES_ACTIVITIES = of("Tourism Experiences & Activities") + + @JvmField + val CRUISE_LINES_MARINE_TOURISM = of("Cruise Lines & Marine Tourism") + + @JvmField + val HOSPITALITY_MANAGEMENT_SYSTEMS = of("Hospitality Management Systems") + + @JvmField val EVENT_VENUE_MANAGEMENT = of("Event & Venue Management") + + @JvmField + val CORPORATE_TRAVEL_MANAGEMENT = of("Corporate Travel Management") + + @JvmField + val TRAVEL_INSURANCE_PROTECTION = of("Travel Insurance & Protection") + + @JvmField + val CONSTRUCTION_MANAGEMENT_SOFTWARE = + of("Construction Management Software") + + @JvmField val BIM_CAD_DESIGN_TOOLS = of("BIM/CAD & Design Tools") + + @JvmField val CONSTRUCTION_MARKETPLACES = of("Construction Marketplaces") + + @JvmField + val EQUIPMENT_RENTAL_MANAGEMENT = of("Equipment Rental & Management") + + @JvmField + val BUILDING_MATERIALS_PROCUREMENT = of("Building Materials & Procurement") + + @JvmField + val CONSTRUCTION_WORKFORCE_MANAGEMENT = + of("Construction Workforce Management") + + @JvmField + val PROJECT_ESTIMATION_BIDDING = of("Project Estimation & Bidding") + + @JvmField + val MODULAR_PREFAB_CONSTRUCTION = of("Modular & Prefab Construction") + + @JvmField + val CONSTRUCTION_SAFETY_COMPLIANCE = of("Construction Safety & Compliance") + + @JvmField val SMART_BUILDING_TECHNOLOGY = of("Smart Building Technology") + + @JvmField val FOOD_BEVERAGE_CPG = of("Food & Beverage CPG") + + @JvmField val HOME_PERSONAL_CARE_CPG = of("Home & Personal Care CPG") + + @JvmField val CPG_ANALYTICS_INSIGHTS = of("CPG Analytics & Insights") + + @JvmField + val DIRECT_TO_CONSUMER_CPG_BRANDS = of("Direct-to-Consumer CPG Brands") + + @JvmField + val CPG_SUPPLY_CHAIN_DISTRIBUTION = of("CPG Supply Chain & Distribution") + + @JvmField + val PRIVATE_LABEL_MANUFACTURING = of("Private Label Manufacturing") + + @JvmField val CPG_RETAIL_INTELLIGENCE = of("CPG Retail Intelligence") + + @JvmField val SUSTAINABLE_CPG_PACKAGING = of("Sustainable CPG & Packaging") + + @JvmField val BEAUTY_COSMETICS_CPG = of("Beauty & Cosmetics CPG") + + @JvmField val HEALTH_WELLNESS_CPG = of("Health & Wellness CPG") + + @JvmStatic fun of(value: String) = Subindustry(JsonField.of(value)) + } + + /** An enum containing [Subindustry]'s known values. */ + enum class Known { + DEFENSE_SYSTEMS_MILITARY_HARDWARE, + AEROSPACE_MANUFACTURING, + AVIONICS_NAVIGATION_TECHNOLOGY, + SUBSEA_NAVAL_DEFENSE_SYSTEMS, + SPACE_SATELLITE_TECHNOLOGY, + DEFENSE_IT_SYSTEMS_INTEGRATION, + SOFTWARE_B2_B, + SOFTWARE_B2_C, + CLOUD_INFRASTRUCTURE_DEV_OPS, + CYBERSECURITY, + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING, + DATA_INFRASTRUCTURE_ANALYTICS, + HARDWARE_SEMICONDUCTORS, + FINTECH_INFRASTRUCTURE, + E_COMMERCE_MARKETPLACE_PLATFORMS, + DEVELOPER_TOOLS_APIS, + WEB3_BLOCKCHAIN, + XR_SPATIAL_COMPUTING, + BANKING_LENDING, + INVESTMENT_MANAGEMENT_WEALTH_TECH, + INSURANCE_INSUR_TECH, + PAYMENTS_MONEY_MOVEMENT, + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS, + CAPITAL_MARKETS_TRADING_PLATFORMS, + FINANCIAL_INFRASTRUCTURE_APIS, + CREDIT_SCORING_RISK_MANAGEMENT, + CRYPTOCURRENCY_DIGITAL_ASSETS, + BNPL_ALTERNATIVE_FINANCING, + HEALTHCARE_PROVIDERS_SERVICES, + PHARMACEUTICALS_DRUG_DEVELOPMENT, + MEDICAL_DEVICES_DIAGNOSTICS, + BIOTECHNOLOGY_GENOMICS, + DIGITAL_HEALTH_TELEMEDICINE, + HEALTH_INSURANCE_BENEFITS_TECH, + CLINICAL_TRIALS_RESEARCH_PLATFORMS, + MENTAL_HEALTH_WELLNESS, + HEALTHCARE_IT_EHR_SYSTEMS, + CONSUMER_HEALTH_WELLNESS_PRODUCTS, + ONLINE_MARKETPLACES, + DIRECT_TO_CONSUMER_DTC_BRANDS, + RETAIL_TECH_POINT_OF_SALE_SYSTEMS, + OMNICHANNEL_IN_STORE_RETAIL, + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE, + SUBSCRIPTION_MEMBERSHIP_COMMERCE, + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS, + FASHION_APPAREL_RETAIL, + FOOD_BEVERAGE_GROCERY_E_COMMERCE, + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO, + GAMING_INTERACTIVE_ENTERTAINMENT, + CREATOR_ECONOMY_INFLUENCER_PLATFORMS, + ADVERTISING_ADTECH_MEDIA_BUYING, + FILM_TV_PRODUCTION_STUDIOS, + EVENTS_VENUES_LIVE_ENTERTAINMENT, + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES, + K_12_EDUCATION_PLATFORMS_TOOLS, + HIGHER_EDUCATION_UNIVERSITY_TECH, + ONLINE_LEARNING_MOO_CS, + TEST_PREP_CERTIFICATION, + CORPORATE_TRAINING_UPSKILLING, + TUTORING_SUPPLEMENTAL_LEARNING, + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS, + LANGUAGE_LEARNING, + CREATOR_LED_COHORT_BASED_COURSES, + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS, + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES, + CIVIC_ENGAGEMENT_POLICY_PLATFORMS, + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID, + PHILANTHROPY_GRANTMAKING, + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS, + PUBLIC_HEALTH_SOCIAL_SERVICES, + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS, + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS, + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY, + MUNICIPAL_INFRASTRUCTURE_SERVICES, + MANUFACTURING_INDUSTRIAL_AUTOMATION, + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR, + RENEWABLE_ENERGY_CLEANTECH, + UTILITIES_GRID_INFRASTRUCTURE, + INDUSTRIAL_IO_T_MONITORING_SYSTEMS, + CONSTRUCTION_HEAVY_EQUIPMENT, + MINING_NATURAL_RESOURCES, + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY, + ENERGY_STORAGE_BATTERY_TECHNOLOGY, + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING, + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE, + MOBILITY_AS_A_SERVICE_MAA_S, + FLEET_MANAGEMENT, + PUBLIC_TRANSIT_URBAN_MOBILITY, + AUTONOMOUS_VEHICLES_ADAS, + AFTERMARKET_PARTS_SERVICES, + TELEMATICS_VEHICLE_CONNECTIVITY, + AVIATION_AEROSPACE_TRANSPORT, + MARITIME_SHIPPING, + FITNESS_WELLNESS, + BEAUTY_PERSONAL_CARE, + HOME_LIVING, + DATING_RELATIONSHIPS, + HOBBIES_CRAFTS_DIY, + OUTDOOR_RECREATIONAL_GEAR, + EVENTS_EXPERIENCES_TICKETING_PLATFORMS, + DESIGNER_LUXURY_APPAREL, + ACCESSORIES_JEWELRY_WATCHES, + FOOTWEAR_LEATHER_GOODS, + BEAUTY_FRAGRANCE_SKINCARE, + FASHION_MARKETPLACES_RETAIL_PLATFORMS, + SUSTAINABLE_ETHICAL_FASHION, + RESALE_VINTAGE_CIRCULAR_FASHION, + FASHION_TECH_VIRTUAL_TRY_ONS, + STREETWEAR_EMERGING_LUXURY, + COUTURE_MADE_TO_MEASURE, + NEWS_PUBLISHING_JOURNALISM, + DIGITAL_MEDIA_CONTENT_PLATFORMS, + BROADCASTING_TV_RADIO, + PODCASTING_AUDIO_MEDIA, + NEWS_AGGREGATORS_CURATION_TOOLS, + INDEPENDENT_CREATOR_LED_MEDIA, + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS, + POLITICAL_INVESTIGATIVE_MEDIA, + TRADE_NICHE_PUBLICATIONS, + MEDIA_MONITORING_ANALYTICS, + PROFESSIONAL_TEAMS_LEAGUES, + SPORTS_MEDIA_BROADCASTING, + SPORTS_BETTING_FANTASY_SPORTS, + FITNESS_ATHLETIC_TRAINING_PLATFORMS, + SPORTSWEAR_EQUIPMENT, + ESPORTS_COMPETITIVE_GAMING, + SPORTS_VENUES_EVENT_MANAGEMENT, + ATHLETE_MANAGEMENT_TALENT_AGENCIES, + SPORTS_TECH_PERFORMANCE_ANALYTICS, + YOUTH_AMATEUR_COLLEGIATE_SPORTS, + REAL_ESTATE_MARKETPLACES, + PROPERTY_MANAGEMENT_SOFTWARE, + RENTAL_PLATFORMS, + MORTGAGE_LENDING_TECH, + REAL_ESTATE_INVESTMENT_PLATFORMS, + LAW_FIRMS_LEGAL_SERVICES, + LEGAL_TECH_AUTOMATION, + REGULATORY_COMPLIANCE, + E_DISCOVERY_LITIGATION_TOOLS, + CONTRACT_MANAGEMENT, + GOVERNANCE_RISK_COMPLIANCE_GRC, + IP_TRADEMARK_MANAGEMENT, + LEGAL_RESEARCH_INTELLIGENCE, + COMPLIANCE_TRAINING_CERTIFICATION, + WHISTLEBLOWER_ETHICS_REPORTING, + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G, + BROADBAND_FIBER_INTERNET, + SATELLITE_SPACE_BASED_COMMUNICATIONS, + NETWORK_EQUIPMENT_INFRASTRUCTURE, + TELECOM_BILLING_OSS_BSS_SYSTEMS, + VO_IP_UNIFIED_COMMUNICATIONS, + INTERNET_SERVICE_PROVIDERS_IS_PS, + EDGE_COMPUTING_NETWORK_VIRTUALIZATION, + IO_T_CONNECTIVITY_PLATFORMS, + PRECISION_AGRICULTURE_AG_TECH, + CROP_LIVESTOCK_PRODUCTION, + FOOD_BEVERAGE_MANUFACTURING_PROCESSING, + FOOD_DISTRIBUTION, + RESTAURANTS_FOOD_SERVICE, + AGRICULTURAL_INPUTS_EQUIPMENT, + SUSTAINABLE_REGENERATIVE_AGRICULTURE, + SEAFOOD_AQUACULTURE, + MANAGEMENT_CONSULTING, + MARKETING_ADVERTISING_AGENCIES, + DESIGN_BRANDING_CREATIVE_STUDIOS, + IT_SERVICES_MANAGED_SERVICES, + STAFFING_RECRUITING_TALENT, + ACCOUNTING_TAX_FIRMS, + PUBLIC_RELATIONS_COMMUNICATIONS, + BUSINESS_PROCESS_OUTSOURCING_BPO, + PROFESSIONAL_TRAINING_COACHING, + SPECIALTY_CHEMICALS, + COMMODITY_PETROCHEMICALS, + POLYMERS_PLASTICS_RUBBER, + COATINGS_ADHESIVES_SEALANTS, + INDUSTRIAL_GASES, + ADVANCED_MATERIALS_COMPOSITES, + BATTERY_MATERIALS_ENERGY_STORAGE, + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS, + AGROCHEMICALS_FERTILIZERS, + FREIGHT_TRANSPORTATION_TECH, + LAST_MILE_DELIVERY, + WAREHOUSE_AUTOMATION, + SUPPLY_CHAIN_VISIBILITY_PLATFORMS, + LOGISTICS_MARKETPLACES, + SHIPPING_FREIGHT_FORWARDING, + COLD_CHAIN_LOGISTICS, + REVERSE_LOGISTICS_RETURNS, + CROSS_BORDER_TRADE_TECH, + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS, + HOTELS_ACCOMMODATION, + VACATION_RENTALS_SHORT_TERM_STAYS, + RESTAURANT_TECH_MANAGEMENT, + TRAVEL_BOOKING_PLATFORMS, + TOURISM_EXPERIENCES_ACTIVITIES, + CRUISE_LINES_MARINE_TOURISM, + HOSPITALITY_MANAGEMENT_SYSTEMS, + EVENT_VENUE_MANAGEMENT, + CORPORATE_TRAVEL_MANAGEMENT, + TRAVEL_INSURANCE_PROTECTION, + CONSTRUCTION_MANAGEMENT_SOFTWARE, + BIM_CAD_DESIGN_TOOLS, + CONSTRUCTION_MARKETPLACES, + EQUIPMENT_RENTAL_MANAGEMENT, + BUILDING_MATERIALS_PROCUREMENT, + CONSTRUCTION_WORKFORCE_MANAGEMENT, + PROJECT_ESTIMATION_BIDDING, + MODULAR_PREFAB_CONSTRUCTION, + CONSTRUCTION_SAFETY_COMPLIANCE, + SMART_BUILDING_TECHNOLOGY, + FOOD_BEVERAGE_CPG, + HOME_PERSONAL_CARE_CPG, + CPG_ANALYTICS_INSIGHTS, + DIRECT_TO_CONSUMER_CPG_BRANDS, + CPG_SUPPLY_CHAIN_DISTRIBUTION, + PRIVATE_LABEL_MANUFACTURING, + CPG_RETAIL_INTELLIGENCE, + SUSTAINABLE_CPG_PACKAGING, + BEAUTY_COSMETICS_CPG, + HEALTH_WELLNESS_CPG, + } + + /** + * An enum containing [Subindustry]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [Subindustry] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For + * example, if the SDK is on an older version than the API, then the API may + * respond with new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + DEFENSE_SYSTEMS_MILITARY_HARDWARE, + AEROSPACE_MANUFACTURING, + AVIONICS_NAVIGATION_TECHNOLOGY, + SUBSEA_NAVAL_DEFENSE_SYSTEMS, + SPACE_SATELLITE_TECHNOLOGY, + DEFENSE_IT_SYSTEMS_INTEGRATION, + SOFTWARE_B2_B, + SOFTWARE_B2_C, + CLOUD_INFRASTRUCTURE_DEV_OPS, + CYBERSECURITY, + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING, + DATA_INFRASTRUCTURE_ANALYTICS, + HARDWARE_SEMICONDUCTORS, + FINTECH_INFRASTRUCTURE, + E_COMMERCE_MARKETPLACE_PLATFORMS, + DEVELOPER_TOOLS_APIS, + WEB3_BLOCKCHAIN, + XR_SPATIAL_COMPUTING, + BANKING_LENDING, + INVESTMENT_MANAGEMENT_WEALTH_TECH, + INSURANCE_INSUR_TECH, + PAYMENTS_MONEY_MOVEMENT, + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS, + CAPITAL_MARKETS_TRADING_PLATFORMS, + FINANCIAL_INFRASTRUCTURE_APIS, + CREDIT_SCORING_RISK_MANAGEMENT, + CRYPTOCURRENCY_DIGITAL_ASSETS, + BNPL_ALTERNATIVE_FINANCING, + HEALTHCARE_PROVIDERS_SERVICES, + PHARMACEUTICALS_DRUG_DEVELOPMENT, + MEDICAL_DEVICES_DIAGNOSTICS, + BIOTECHNOLOGY_GENOMICS, + DIGITAL_HEALTH_TELEMEDICINE, + HEALTH_INSURANCE_BENEFITS_TECH, + CLINICAL_TRIALS_RESEARCH_PLATFORMS, + MENTAL_HEALTH_WELLNESS, + HEALTHCARE_IT_EHR_SYSTEMS, + CONSUMER_HEALTH_WELLNESS_PRODUCTS, + ONLINE_MARKETPLACES, + DIRECT_TO_CONSUMER_DTC_BRANDS, + RETAIL_TECH_POINT_OF_SALE_SYSTEMS, + OMNICHANNEL_IN_STORE_RETAIL, + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE, + SUBSCRIPTION_MEMBERSHIP_COMMERCE, + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS, + FASHION_APPAREL_RETAIL, + FOOD_BEVERAGE_GROCERY_E_COMMERCE, + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO, + GAMING_INTERACTIVE_ENTERTAINMENT, + CREATOR_ECONOMY_INFLUENCER_PLATFORMS, + ADVERTISING_ADTECH_MEDIA_BUYING, + FILM_TV_PRODUCTION_STUDIOS, + EVENTS_VENUES_LIVE_ENTERTAINMENT, + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES, + K_12_EDUCATION_PLATFORMS_TOOLS, + HIGHER_EDUCATION_UNIVERSITY_TECH, + ONLINE_LEARNING_MOO_CS, + TEST_PREP_CERTIFICATION, + CORPORATE_TRAINING_UPSKILLING, + TUTORING_SUPPLEMENTAL_LEARNING, + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS, + LANGUAGE_LEARNING, + CREATOR_LED_COHORT_BASED_COURSES, + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS, + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES, + CIVIC_ENGAGEMENT_POLICY_PLATFORMS, + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID, + PHILANTHROPY_GRANTMAKING, + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS, + PUBLIC_HEALTH_SOCIAL_SERVICES, + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS, + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS, + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY, + MUNICIPAL_INFRASTRUCTURE_SERVICES, + MANUFACTURING_INDUSTRIAL_AUTOMATION, + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR, + RENEWABLE_ENERGY_CLEANTECH, + UTILITIES_GRID_INFRASTRUCTURE, + INDUSTRIAL_IO_T_MONITORING_SYSTEMS, + CONSTRUCTION_HEAVY_EQUIPMENT, + MINING_NATURAL_RESOURCES, + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY, + ENERGY_STORAGE_BATTERY_TECHNOLOGY, + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING, + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE, + MOBILITY_AS_A_SERVICE_MAA_S, + FLEET_MANAGEMENT, + PUBLIC_TRANSIT_URBAN_MOBILITY, + AUTONOMOUS_VEHICLES_ADAS, + AFTERMARKET_PARTS_SERVICES, + TELEMATICS_VEHICLE_CONNECTIVITY, + AVIATION_AEROSPACE_TRANSPORT, + MARITIME_SHIPPING, + FITNESS_WELLNESS, + BEAUTY_PERSONAL_CARE, + HOME_LIVING, + DATING_RELATIONSHIPS, + HOBBIES_CRAFTS_DIY, + OUTDOOR_RECREATIONAL_GEAR, + EVENTS_EXPERIENCES_TICKETING_PLATFORMS, + DESIGNER_LUXURY_APPAREL, + ACCESSORIES_JEWELRY_WATCHES, + FOOTWEAR_LEATHER_GOODS, + BEAUTY_FRAGRANCE_SKINCARE, + FASHION_MARKETPLACES_RETAIL_PLATFORMS, + SUSTAINABLE_ETHICAL_FASHION, + RESALE_VINTAGE_CIRCULAR_FASHION, + FASHION_TECH_VIRTUAL_TRY_ONS, + STREETWEAR_EMERGING_LUXURY, + COUTURE_MADE_TO_MEASURE, + NEWS_PUBLISHING_JOURNALISM, + DIGITAL_MEDIA_CONTENT_PLATFORMS, + BROADCASTING_TV_RADIO, + PODCASTING_AUDIO_MEDIA, + NEWS_AGGREGATORS_CURATION_TOOLS, + INDEPENDENT_CREATOR_LED_MEDIA, + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS, + POLITICAL_INVESTIGATIVE_MEDIA, + TRADE_NICHE_PUBLICATIONS, + MEDIA_MONITORING_ANALYTICS, + PROFESSIONAL_TEAMS_LEAGUES, + SPORTS_MEDIA_BROADCASTING, + SPORTS_BETTING_FANTASY_SPORTS, + FITNESS_ATHLETIC_TRAINING_PLATFORMS, + SPORTSWEAR_EQUIPMENT, + ESPORTS_COMPETITIVE_GAMING, + SPORTS_VENUES_EVENT_MANAGEMENT, + ATHLETE_MANAGEMENT_TALENT_AGENCIES, + SPORTS_TECH_PERFORMANCE_ANALYTICS, + YOUTH_AMATEUR_COLLEGIATE_SPORTS, + REAL_ESTATE_MARKETPLACES, + PROPERTY_MANAGEMENT_SOFTWARE, + RENTAL_PLATFORMS, + MORTGAGE_LENDING_TECH, + REAL_ESTATE_INVESTMENT_PLATFORMS, + LAW_FIRMS_LEGAL_SERVICES, + LEGAL_TECH_AUTOMATION, + REGULATORY_COMPLIANCE, + E_DISCOVERY_LITIGATION_TOOLS, + CONTRACT_MANAGEMENT, + GOVERNANCE_RISK_COMPLIANCE_GRC, + IP_TRADEMARK_MANAGEMENT, + LEGAL_RESEARCH_INTELLIGENCE, + COMPLIANCE_TRAINING_CERTIFICATION, + WHISTLEBLOWER_ETHICS_REPORTING, + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G, + BROADBAND_FIBER_INTERNET, + SATELLITE_SPACE_BASED_COMMUNICATIONS, + NETWORK_EQUIPMENT_INFRASTRUCTURE, + TELECOM_BILLING_OSS_BSS_SYSTEMS, + VO_IP_UNIFIED_COMMUNICATIONS, + INTERNET_SERVICE_PROVIDERS_IS_PS, + EDGE_COMPUTING_NETWORK_VIRTUALIZATION, + IO_T_CONNECTIVITY_PLATFORMS, + PRECISION_AGRICULTURE_AG_TECH, + CROP_LIVESTOCK_PRODUCTION, + FOOD_BEVERAGE_MANUFACTURING_PROCESSING, + FOOD_DISTRIBUTION, + RESTAURANTS_FOOD_SERVICE, + AGRICULTURAL_INPUTS_EQUIPMENT, + SUSTAINABLE_REGENERATIVE_AGRICULTURE, + SEAFOOD_AQUACULTURE, + MANAGEMENT_CONSULTING, + MARKETING_ADVERTISING_AGENCIES, + DESIGN_BRANDING_CREATIVE_STUDIOS, + IT_SERVICES_MANAGED_SERVICES, + STAFFING_RECRUITING_TALENT, + ACCOUNTING_TAX_FIRMS, + PUBLIC_RELATIONS_COMMUNICATIONS, + BUSINESS_PROCESS_OUTSOURCING_BPO, + PROFESSIONAL_TRAINING_COACHING, + SPECIALTY_CHEMICALS, + COMMODITY_PETROCHEMICALS, + POLYMERS_PLASTICS_RUBBER, + COATINGS_ADHESIVES_SEALANTS, + INDUSTRIAL_GASES, + ADVANCED_MATERIALS_COMPOSITES, + BATTERY_MATERIALS_ENERGY_STORAGE, + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS, + AGROCHEMICALS_FERTILIZERS, + FREIGHT_TRANSPORTATION_TECH, + LAST_MILE_DELIVERY, + WAREHOUSE_AUTOMATION, + SUPPLY_CHAIN_VISIBILITY_PLATFORMS, + LOGISTICS_MARKETPLACES, + SHIPPING_FREIGHT_FORWARDING, + COLD_CHAIN_LOGISTICS, + REVERSE_LOGISTICS_RETURNS, + CROSS_BORDER_TRADE_TECH, + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS, + HOTELS_ACCOMMODATION, + VACATION_RENTALS_SHORT_TERM_STAYS, + RESTAURANT_TECH_MANAGEMENT, + TRAVEL_BOOKING_PLATFORMS, + TOURISM_EXPERIENCES_ACTIVITIES, + CRUISE_LINES_MARINE_TOURISM, + HOSPITALITY_MANAGEMENT_SYSTEMS, + EVENT_VENUE_MANAGEMENT, + CORPORATE_TRAVEL_MANAGEMENT, + TRAVEL_INSURANCE_PROTECTION, + CONSTRUCTION_MANAGEMENT_SOFTWARE, + BIM_CAD_DESIGN_TOOLS, + CONSTRUCTION_MARKETPLACES, + EQUIPMENT_RENTAL_MANAGEMENT, + BUILDING_MATERIALS_PROCUREMENT, + CONSTRUCTION_WORKFORCE_MANAGEMENT, + PROJECT_ESTIMATION_BIDDING, + MODULAR_PREFAB_CONSTRUCTION, + CONSTRUCTION_SAFETY_COMPLIANCE, + SMART_BUILDING_TECHNOLOGY, + FOOD_BEVERAGE_CPG, + HOME_PERSONAL_CARE_CPG, + CPG_ANALYTICS_INSIGHTS, + DIRECT_TO_CONSUMER_CPG_BRANDS, + CPG_SUPPLY_CHAIN_DISTRIBUTION, + PRIVATE_LABEL_MANUFACTURING, + CPG_RETAIL_INTELLIGENCE, + SUSTAINABLE_CPG_PACKAGING, + BEAUTY_COSMETICS_CPG, + HEALTH_WELLNESS_CPG, + /** + * An enum member indicating that [Subindustry] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or + * if you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + DEFENSE_SYSTEMS_MILITARY_HARDWARE -> + Value.DEFENSE_SYSTEMS_MILITARY_HARDWARE + AEROSPACE_MANUFACTURING -> Value.AEROSPACE_MANUFACTURING + AVIONICS_NAVIGATION_TECHNOLOGY -> Value.AVIONICS_NAVIGATION_TECHNOLOGY + SUBSEA_NAVAL_DEFENSE_SYSTEMS -> Value.SUBSEA_NAVAL_DEFENSE_SYSTEMS + SPACE_SATELLITE_TECHNOLOGY -> Value.SPACE_SATELLITE_TECHNOLOGY + DEFENSE_IT_SYSTEMS_INTEGRATION -> Value.DEFENSE_IT_SYSTEMS_INTEGRATION + SOFTWARE_B2_B -> Value.SOFTWARE_B2_B + SOFTWARE_B2_C -> Value.SOFTWARE_B2_C + CLOUD_INFRASTRUCTURE_DEV_OPS -> Value.CLOUD_INFRASTRUCTURE_DEV_OPS + CYBERSECURITY -> Value.CYBERSECURITY + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING -> + Value.ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING + DATA_INFRASTRUCTURE_ANALYTICS -> Value.DATA_INFRASTRUCTURE_ANALYTICS + HARDWARE_SEMICONDUCTORS -> Value.HARDWARE_SEMICONDUCTORS + FINTECH_INFRASTRUCTURE -> Value.FINTECH_INFRASTRUCTURE + E_COMMERCE_MARKETPLACE_PLATFORMS -> + Value.E_COMMERCE_MARKETPLACE_PLATFORMS + DEVELOPER_TOOLS_APIS -> Value.DEVELOPER_TOOLS_APIS + WEB3_BLOCKCHAIN -> Value.WEB3_BLOCKCHAIN + XR_SPATIAL_COMPUTING -> Value.XR_SPATIAL_COMPUTING + BANKING_LENDING -> Value.BANKING_LENDING + INVESTMENT_MANAGEMENT_WEALTH_TECH -> + Value.INVESTMENT_MANAGEMENT_WEALTH_TECH + INSURANCE_INSUR_TECH -> Value.INSURANCE_INSUR_TECH + PAYMENTS_MONEY_MOVEMENT -> Value.PAYMENTS_MONEY_MOVEMENT + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS -> + Value.ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS + CAPITAL_MARKETS_TRADING_PLATFORMS -> + Value.CAPITAL_MARKETS_TRADING_PLATFORMS + FINANCIAL_INFRASTRUCTURE_APIS -> Value.FINANCIAL_INFRASTRUCTURE_APIS + CREDIT_SCORING_RISK_MANAGEMENT -> Value.CREDIT_SCORING_RISK_MANAGEMENT + CRYPTOCURRENCY_DIGITAL_ASSETS -> Value.CRYPTOCURRENCY_DIGITAL_ASSETS + BNPL_ALTERNATIVE_FINANCING -> Value.BNPL_ALTERNATIVE_FINANCING + HEALTHCARE_PROVIDERS_SERVICES -> Value.HEALTHCARE_PROVIDERS_SERVICES + PHARMACEUTICALS_DRUG_DEVELOPMENT -> + Value.PHARMACEUTICALS_DRUG_DEVELOPMENT + MEDICAL_DEVICES_DIAGNOSTICS -> Value.MEDICAL_DEVICES_DIAGNOSTICS + BIOTECHNOLOGY_GENOMICS -> Value.BIOTECHNOLOGY_GENOMICS + DIGITAL_HEALTH_TELEMEDICINE -> Value.DIGITAL_HEALTH_TELEMEDICINE + HEALTH_INSURANCE_BENEFITS_TECH -> Value.HEALTH_INSURANCE_BENEFITS_TECH + CLINICAL_TRIALS_RESEARCH_PLATFORMS -> + Value.CLINICAL_TRIALS_RESEARCH_PLATFORMS + MENTAL_HEALTH_WELLNESS -> Value.MENTAL_HEALTH_WELLNESS + HEALTHCARE_IT_EHR_SYSTEMS -> Value.HEALTHCARE_IT_EHR_SYSTEMS + CONSUMER_HEALTH_WELLNESS_PRODUCTS -> + Value.CONSUMER_HEALTH_WELLNESS_PRODUCTS + ONLINE_MARKETPLACES -> Value.ONLINE_MARKETPLACES + DIRECT_TO_CONSUMER_DTC_BRANDS -> Value.DIRECT_TO_CONSUMER_DTC_BRANDS + RETAIL_TECH_POINT_OF_SALE_SYSTEMS -> + Value.RETAIL_TECH_POINT_OF_SALE_SYSTEMS + OMNICHANNEL_IN_STORE_RETAIL -> Value.OMNICHANNEL_IN_STORE_RETAIL + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE -> + Value.E_COMMERCE_ENABLEMENT_INFRASTRUCTURE + SUBSCRIPTION_MEMBERSHIP_COMMERCE -> + Value.SUBSCRIPTION_MEMBERSHIP_COMMERCE + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS -> + Value.SOCIAL_COMMERCE_INFLUENCER_PLATFORMS + FASHION_APPAREL_RETAIL -> Value.FASHION_APPAREL_RETAIL + FOOD_BEVERAGE_GROCERY_E_COMMERCE -> + Value.FOOD_BEVERAGE_GROCERY_E_COMMERCE + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO -> + Value.STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO + GAMING_INTERACTIVE_ENTERTAINMENT -> + Value.GAMING_INTERACTIVE_ENTERTAINMENT + CREATOR_ECONOMY_INFLUENCER_PLATFORMS -> + Value.CREATOR_ECONOMY_INFLUENCER_PLATFORMS + ADVERTISING_ADTECH_MEDIA_BUYING -> Value.ADVERTISING_ADTECH_MEDIA_BUYING + FILM_TV_PRODUCTION_STUDIOS -> Value.FILM_TV_PRODUCTION_STUDIOS + EVENTS_VENUES_LIVE_ENTERTAINMENT -> + Value.EVENTS_VENUES_LIVE_ENTERTAINMENT + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES -> + Value.VIRTUAL_WORLDS_METAVERSE_EXPERIENCES + K_12_EDUCATION_PLATFORMS_TOOLS -> Value.K_12_EDUCATION_PLATFORMS_TOOLS + HIGHER_EDUCATION_UNIVERSITY_TECH -> + Value.HIGHER_EDUCATION_UNIVERSITY_TECH + ONLINE_LEARNING_MOO_CS -> Value.ONLINE_LEARNING_MOO_CS + TEST_PREP_CERTIFICATION -> Value.TEST_PREP_CERTIFICATION + CORPORATE_TRAINING_UPSKILLING -> Value.CORPORATE_TRAINING_UPSKILLING + TUTORING_SUPPLEMENTAL_LEARNING -> Value.TUTORING_SUPPLEMENTAL_LEARNING + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS -> + Value.EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS + LANGUAGE_LEARNING -> Value.LANGUAGE_LEARNING + CREATOR_LED_COHORT_BASED_COURSES -> + Value.CREATOR_LED_COHORT_BASED_COURSES + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS -> + Value.SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES -> + Value.GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES + CIVIC_ENGAGEMENT_POLICY_PLATFORMS -> + Value.CIVIC_ENGAGEMENT_POLICY_PLATFORMS + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID -> + Value.INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID + PHILANTHROPY_GRANTMAKING -> Value.PHILANTHROPY_GRANTMAKING + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS -> + Value.NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS + PUBLIC_HEALTH_SOCIAL_SERVICES -> Value.PUBLIC_HEALTH_SOCIAL_SERVICES + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS -> + Value.EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS -> + Value.ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY -> + Value.LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY + MUNICIPAL_INFRASTRUCTURE_SERVICES -> + Value.MUNICIPAL_INFRASTRUCTURE_SERVICES + MANUFACTURING_INDUSTRIAL_AUTOMATION -> + Value.MANUFACTURING_INDUSTRIAL_AUTOMATION + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR -> + Value.ENERGY_PRODUCTION_OIL_GAS_NUCLEAR + RENEWABLE_ENERGY_CLEANTECH -> Value.RENEWABLE_ENERGY_CLEANTECH + UTILITIES_GRID_INFRASTRUCTURE -> Value.UTILITIES_GRID_INFRASTRUCTURE + INDUSTRIAL_IO_T_MONITORING_SYSTEMS -> + Value.INDUSTRIAL_IO_T_MONITORING_SYSTEMS + CONSTRUCTION_HEAVY_EQUIPMENT -> Value.CONSTRUCTION_HEAVY_EQUIPMENT + MINING_NATURAL_RESOURCES -> Value.MINING_NATURAL_RESOURCES + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY -> + Value.ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY + ENERGY_STORAGE_BATTERY_TECHNOLOGY -> + Value.ENERGY_STORAGE_BATTERY_TECHNOLOGY + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING -> + Value.AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE -> + Value.ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE + MOBILITY_AS_A_SERVICE_MAA_S -> Value.MOBILITY_AS_A_SERVICE_MAA_S + FLEET_MANAGEMENT -> Value.FLEET_MANAGEMENT + PUBLIC_TRANSIT_URBAN_MOBILITY -> Value.PUBLIC_TRANSIT_URBAN_MOBILITY + AUTONOMOUS_VEHICLES_ADAS -> Value.AUTONOMOUS_VEHICLES_ADAS + AFTERMARKET_PARTS_SERVICES -> Value.AFTERMARKET_PARTS_SERVICES + TELEMATICS_VEHICLE_CONNECTIVITY -> Value.TELEMATICS_VEHICLE_CONNECTIVITY + AVIATION_AEROSPACE_TRANSPORT -> Value.AVIATION_AEROSPACE_TRANSPORT + MARITIME_SHIPPING -> Value.MARITIME_SHIPPING + FITNESS_WELLNESS -> Value.FITNESS_WELLNESS + BEAUTY_PERSONAL_CARE -> Value.BEAUTY_PERSONAL_CARE + HOME_LIVING -> Value.HOME_LIVING + DATING_RELATIONSHIPS -> Value.DATING_RELATIONSHIPS + HOBBIES_CRAFTS_DIY -> Value.HOBBIES_CRAFTS_DIY + OUTDOOR_RECREATIONAL_GEAR -> Value.OUTDOOR_RECREATIONAL_GEAR + EVENTS_EXPERIENCES_TICKETING_PLATFORMS -> + Value.EVENTS_EXPERIENCES_TICKETING_PLATFORMS + DESIGNER_LUXURY_APPAREL -> Value.DESIGNER_LUXURY_APPAREL + ACCESSORIES_JEWELRY_WATCHES -> Value.ACCESSORIES_JEWELRY_WATCHES + FOOTWEAR_LEATHER_GOODS -> Value.FOOTWEAR_LEATHER_GOODS + BEAUTY_FRAGRANCE_SKINCARE -> Value.BEAUTY_FRAGRANCE_SKINCARE + FASHION_MARKETPLACES_RETAIL_PLATFORMS -> + Value.FASHION_MARKETPLACES_RETAIL_PLATFORMS + SUSTAINABLE_ETHICAL_FASHION -> Value.SUSTAINABLE_ETHICAL_FASHION + RESALE_VINTAGE_CIRCULAR_FASHION -> Value.RESALE_VINTAGE_CIRCULAR_FASHION + FASHION_TECH_VIRTUAL_TRY_ONS -> Value.FASHION_TECH_VIRTUAL_TRY_ONS + STREETWEAR_EMERGING_LUXURY -> Value.STREETWEAR_EMERGING_LUXURY + COUTURE_MADE_TO_MEASURE -> Value.COUTURE_MADE_TO_MEASURE + NEWS_PUBLISHING_JOURNALISM -> Value.NEWS_PUBLISHING_JOURNALISM + DIGITAL_MEDIA_CONTENT_PLATFORMS -> Value.DIGITAL_MEDIA_CONTENT_PLATFORMS + BROADCASTING_TV_RADIO -> Value.BROADCASTING_TV_RADIO + PODCASTING_AUDIO_MEDIA -> Value.PODCASTING_AUDIO_MEDIA + NEWS_AGGREGATORS_CURATION_TOOLS -> Value.NEWS_AGGREGATORS_CURATION_TOOLS + INDEPENDENT_CREATOR_LED_MEDIA -> Value.INDEPENDENT_CREATOR_LED_MEDIA + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS -> + Value.NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS + POLITICAL_INVESTIGATIVE_MEDIA -> Value.POLITICAL_INVESTIGATIVE_MEDIA + TRADE_NICHE_PUBLICATIONS -> Value.TRADE_NICHE_PUBLICATIONS + MEDIA_MONITORING_ANALYTICS -> Value.MEDIA_MONITORING_ANALYTICS + PROFESSIONAL_TEAMS_LEAGUES -> Value.PROFESSIONAL_TEAMS_LEAGUES + SPORTS_MEDIA_BROADCASTING -> Value.SPORTS_MEDIA_BROADCASTING + SPORTS_BETTING_FANTASY_SPORTS -> Value.SPORTS_BETTING_FANTASY_SPORTS + FITNESS_ATHLETIC_TRAINING_PLATFORMS -> + Value.FITNESS_ATHLETIC_TRAINING_PLATFORMS + SPORTSWEAR_EQUIPMENT -> Value.SPORTSWEAR_EQUIPMENT + ESPORTS_COMPETITIVE_GAMING -> Value.ESPORTS_COMPETITIVE_GAMING + SPORTS_VENUES_EVENT_MANAGEMENT -> Value.SPORTS_VENUES_EVENT_MANAGEMENT + ATHLETE_MANAGEMENT_TALENT_AGENCIES -> + Value.ATHLETE_MANAGEMENT_TALENT_AGENCIES + SPORTS_TECH_PERFORMANCE_ANALYTICS -> + Value.SPORTS_TECH_PERFORMANCE_ANALYTICS + YOUTH_AMATEUR_COLLEGIATE_SPORTS -> Value.YOUTH_AMATEUR_COLLEGIATE_SPORTS + REAL_ESTATE_MARKETPLACES -> Value.REAL_ESTATE_MARKETPLACES + PROPERTY_MANAGEMENT_SOFTWARE -> Value.PROPERTY_MANAGEMENT_SOFTWARE + RENTAL_PLATFORMS -> Value.RENTAL_PLATFORMS + MORTGAGE_LENDING_TECH -> Value.MORTGAGE_LENDING_TECH + REAL_ESTATE_INVESTMENT_PLATFORMS -> + Value.REAL_ESTATE_INVESTMENT_PLATFORMS + LAW_FIRMS_LEGAL_SERVICES -> Value.LAW_FIRMS_LEGAL_SERVICES + LEGAL_TECH_AUTOMATION -> Value.LEGAL_TECH_AUTOMATION + REGULATORY_COMPLIANCE -> Value.REGULATORY_COMPLIANCE + E_DISCOVERY_LITIGATION_TOOLS -> Value.E_DISCOVERY_LITIGATION_TOOLS + CONTRACT_MANAGEMENT -> Value.CONTRACT_MANAGEMENT + GOVERNANCE_RISK_COMPLIANCE_GRC -> Value.GOVERNANCE_RISK_COMPLIANCE_GRC + IP_TRADEMARK_MANAGEMENT -> Value.IP_TRADEMARK_MANAGEMENT + LEGAL_RESEARCH_INTELLIGENCE -> Value.LEGAL_RESEARCH_INTELLIGENCE + COMPLIANCE_TRAINING_CERTIFICATION -> + Value.COMPLIANCE_TRAINING_CERTIFICATION + WHISTLEBLOWER_ETHICS_REPORTING -> Value.WHISTLEBLOWER_ETHICS_REPORTING + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G -> + Value.MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G + BROADBAND_FIBER_INTERNET -> Value.BROADBAND_FIBER_INTERNET + SATELLITE_SPACE_BASED_COMMUNICATIONS -> + Value.SATELLITE_SPACE_BASED_COMMUNICATIONS + NETWORK_EQUIPMENT_INFRASTRUCTURE -> + Value.NETWORK_EQUIPMENT_INFRASTRUCTURE + TELECOM_BILLING_OSS_BSS_SYSTEMS -> Value.TELECOM_BILLING_OSS_BSS_SYSTEMS + VO_IP_UNIFIED_COMMUNICATIONS -> Value.VO_IP_UNIFIED_COMMUNICATIONS + INTERNET_SERVICE_PROVIDERS_IS_PS -> + Value.INTERNET_SERVICE_PROVIDERS_IS_PS + EDGE_COMPUTING_NETWORK_VIRTUALIZATION -> + Value.EDGE_COMPUTING_NETWORK_VIRTUALIZATION + IO_T_CONNECTIVITY_PLATFORMS -> Value.IO_T_CONNECTIVITY_PLATFORMS + PRECISION_AGRICULTURE_AG_TECH -> Value.PRECISION_AGRICULTURE_AG_TECH + CROP_LIVESTOCK_PRODUCTION -> Value.CROP_LIVESTOCK_PRODUCTION + FOOD_BEVERAGE_MANUFACTURING_PROCESSING -> + Value.FOOD_BEVERAGE_MANUFACTURING_PROCESSING + FOOD_DISTRIBUTION -> Value.FOOD_DISTRIBUTION + RESTAURANTS_FOOD_SERVICE -> Value.RESTAURANTS_FOOD_SERVICE + AGRICULTURAL_INPUTS_EQUIPMENT -> Value.AGRICULTURAL_INPUTS_EQUIPMENT + SUSTAINABLE_REGENERATIVE_AGRICULTURE -> + Value.SUSTAINABLE_REGENERATIVE_AGRICULTURE + SEAFOOD_AQUACULTURE -> Value.SEAFOOD_AQUACULTURE + MANAGEMENT_CONSULTING -> Value.MANAGEMENT_CONSULTING + MARKETING_ADVERTISING_AGENCIES -> Value.MARKETING_ADVERTISING_AGENCIES + DESIGN_BRANDING_CREATIVE_STUDIOS -> + Value.DESIGN_BRANDING_CREATIVE_STUDIOS + IT_SERVICES_MANAGED_SERVICES -> Value.IT_SERVICES_MANAGED_SERVICES + STAFFING_RECRUITING_TALENT -> Value.STAFFING_RECRUITING_TALENT + ACCOUNTING_TAX_FIRMS -> Value.ACCOUNTING_TAX_FIRMS + PUBLIC_RELATIONS_COMMUNICATIONS -> Value.PUBLIC_RELATIONS_COMMUNICATIONS + BUSINESS_PROCESS_OUTSOURCING_BPO -> + Value.BUSINESS_PROCESS_OUTSOURCING_BPO + PROFESSIONAL_TRAINING_COACHING -> Value.PROFESSIONAL_TRAINING_COACHING + SPECIALTY_CHEMICALS -> Value.SPECIALTY_CHEMICALS + COMMODITY_PETROCHEMICALS -> Value.COMMODITY_PETROCHEMICALS + POLYMERS_PLASTICS_RUBBER -> Value.POLYMERS_PLASTICS_RUBBER + COATINGS_ADHESIVES_SEALANTS -> Value.COATINGS_ADHESIVES_SEALANTS + INDUSTRIAL_GASES -> Value.INDUSTRIAL_GASES + ADVANCED_MATERIALS_COMPOSITES -> Value.ADVANCED_MATERIALS_COMPOSITES + BATTERY_MATERIALS_ENERGY_STORAGE -> + Value.BATTERY_MATERIALS_ENERGY_STORAGE + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS -> + Value.ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS + AGROCHEMICALS_FERTILIZERS -> Value.AGROCHEMICALS_FERTILIZERS + FREIGHT_TRANSPORTATION_TECH -> Value.FREIGHT_TRANSPORTATION_TECH + LAST_MILE_DELIVERY -> Value.LAST_MILE_DELIVERY + WAREHOUSE_AUTOMATION -> Value.WAREHOUSE_AUTOMATION + SUPPLY_CHAIN_VISIBILITY_PLATFORMS -> + Value.SUPPLY_CHAIN_VISIBILITY_PLATFORMS + LOGISTICS_MARKETPLACES -> Value.LOGISTICS_MARKETPLACES + SHIPPING_FREIGHT_FORWARDING -> Value.SHIPPING_FREIGHT_FORWARDING + COLD_CHAIN_LOGISTICS -> Value.COLD_CHAIN_LOGISTICS + REVERSE_LOGISTICS_RETURNS -> Value.REVERSE_LOGISTICS_RETURNS + CROSS_BORDER_TRADE_TECH -> Value.CROSS_BORDER_TRADE_TECH + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS -> + Value.TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS + HOTELS_ACCOMMODATION -> Value.HOTELS_ACCOMMODATION + VACATION_RENTALS_SHORT_TERM_STAYS -> + Value.VACATION_RENTALS_SHORT_TERM_STAYS + RESTAURANT_TECH_MANAGEMENT -> Value.RESTAURANT_TECH_MANAGEMENT + TRAVEL_BOOKING_PLATFORMS -> Value.TRAVEL_BOOKING_PLATFORMS + TOURISM_EXPERIENCES_ACTIVITIES -> Value.TOURISM_EXPERIENCES_ACTIVITIES + CRUISE_LINES_MARINE_TOURISM -> Value.CRUISE_LINES_MARINE_TOURISM + HOSPITALITY_MANAGEMENT_SYSTEMS -> Value.HOSPITALITY_MANAGEMENT_SYSTEMS + EVENT_VENUE_MANAGEMENT -> Value.EVENT_VENUE_MANAGEMENT + CORPORATE_TRAVEL_MANAGEMENT -> Value.CORPORATE_TRAVEL_MANAGEMENT + TRAVEL_INSURANCE_PROTECTION -> Value.TRAVEL_INSURANCE_PROTECTION + CONSTRUCTION_MANAGEMENT_SOFTWARE -> + Value.CONSTRUCTION_MANAGEMENT_SOFTWARE + BIM_CAD_DESIGN_TOOLS -> Value.BIM_CAD_DESIGN_TOOLS + CONSTRUCTION_MARKETPLACES -> Value.CONSTRUCTION_MARKETPLACES + EQUIPMENT_RENTAL_MANAGEMENT -> Value.EQUIPMENT_RENTAL_MANAGEMENT + BUILDING_MATERIALS_PROCUREMENT -> Value.BUILDING_MATERIALS_PROCUREMENT + CONSTRUCTION_WORKFORCE_MANAGEMENT -> + Value.CONSTRUCTION_WORKFORCE_MANAGEMENT + PROJECT_ESTIMATION_BIDDING -> Value.PROJECT_ESTIMATION_BIDDING + MODULAR_PREFAB_CONSTRUCTION -> Value.MODULAR_PREFAB_CONSTRUCTION + CONSTRUCTION_SAFETY_COMPLIANCE -> Value.CONSTRUCTION_SAFETY_COMPLIANCE + SMART_BUILDING_TECHNOLOGY -> Value.SMART_BUILDING_TECHNOLOGY + FOOD_BEVERAGE_CPG -> Value.FOOD_BEVERAGE_CPG + HOME_PERSONAL_CARE_CPG -> Value.HOME_PERSONAL_CARE_CPG + CPG_ANALYTICS_INSIGHTS -> Value.CPG_ANALYTICS_INSIGHTS + DIRECT_TO_CONSUMER_CPG_BRANDS -> Value.DIRECT_TO_CONSUMER_CPG_BRANDS + CPG_SUPPLY_CHAIN_DISTRIBUTION -> Value.CPG_SUPPLY_CHAIN_DISTRIBUTION + PRIVATE_LABEL_MANUFACTURING -> Value.PRIVATE_LABEL_MANUFACTURING + CPG_RETAIL_INTELLIGENCE -> Value.CPG_RETAIL_INTELLIGENCE + SUSTAINABLE_CPG_PACKAGING -> Value.SUSTAINABLE_CPG_PACKAGING + BEAUTY_COSMETICS_CPG -> Value.BEAUTY_COSMETICS_CPG + HEALTH_WELLNESS_CPG -> Value.HEALTH_WELLNESS_CPG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known + * and don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not + * a known member. + */ + fun known(): Known = + when (this) { + DEFENSE_SYSTEMS_MILITARY_HARDWARE -> + Known.DEFENSE_SYSTEMS_MILITARY_HARDWARE + AEROSPACE_MANUFACTURING -> Known.AEROSPACE_MANUFACTURING + AVIONICS_NAVIGATION_TECHNOLOGY -> Known.AVIONICS_NAVIGATION_TECHNOLOGY + SUBSEA_NAVAL_DEFENSE_SYSTEMS -> Known.SUBSEA_NAVAL_DEFENSE_SYSTEMS + SPACE_SATELLITE_TECHNOLOGY -> Known.SPACE_SATELLITE_TECHNOLOGY + DEFENSE_IT_SYSTEMS_INTEGRATION -> Known.DEFENSE_IT_SYSTEMS_INTEGRATION + SOFTWARE_B2_B -> Known.SOFTWARE_B2_B + SOFTWARE_B2_C -> Known.SOFTWARE_B2_C + CLOUD_INFRASTRUCTURE_DEV_OPS -> Known.CLOUD_INFRASTRUCTURE_DEV_OPS + CYBERSECURITY -> Known.CYBERSECURITY + ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING -> + Known.ARTIFICIAL_INTELLIGENCE_MACHINE_LEARNING + DATA_INFRASTRUCTURE_ANALYTICS -> Known.DATA_INFRASTRUCTURE_ANALYTICS + HARDWARE_SEMICONDUCTORS -> Known.HARDWARE_SEMICONDUCTORS + FINTECH_INFRASTRUCTURE -> Known.FINTECH_INFRASTRUCTURE + E_COMMERCE_MARKETPLACE_PLATFORMS -> + Known.E_COMMERCE_MARKETPLACE_PLATFORMS + DEVELOPER_TOOLS_APIS -> Known.DEVELOPER_TOOLS_APIS + WEB3_BLOCKCHAIN -> Known.WEB3_BLOCKCHAIN + XR_SPATIAL_COMPUTING -> Known.XR_SPATIAL_COMPUTING + BANKING_LENDING -> Known.BANKING_LENDING + INVESTMENT_MANAGEMENT_WEALTH_TECH -> + Known.INVESTMENT_MANAGEMENT_WEALTH_TECH + INSURANCE_INSUR_TECH -> Known.INSURANCE_INSUR_TECH + PAYMENTS_MONEY_MOVEMENT -> Known.PAYMENTS_MONEY_MOVEMENT + ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS -> + Known.ACCOUNTING_TAX_FINANCIAL_PLANNING_TOOLS + CAPITAL_MARKETS_TRADING_PLATFORMS -> + Known.CAPITAL_MARKETS_TRADING_PLATFORMS + FINANCIAL_INFRASTRUCTURE_APIS -> Known.FINANCIAL_INFRASTRUCTURE_APIS + CREDIT_SCORING_RISK_MANAGEMENT -> Known.CREDIT_SCORING_RISK_MANAGEMENT + CRYPTOCURRENCY_DIGITAL_ASSETS -> Known.CRYPTOCURRENCY_DIGITAL_ASSETS + BNPL_ALTERNATIVE_FINANCING -> Known.BNPL_ALTERNATIVE_FINANCING + HEALTHCARE_PROVIDERS_SERVICES -> Known.HEALTHCARE_PROVIDERS_SERVICES + PHARMACEUTICALS_DRUG_DEVELOPMENT -> + Known.PHARMACEUTICALS_DRUG_DEVELOPMENT + MEDICAL_DEVICES_DIAGNOSTICS -> Known.MEDICAL_DEVICES_DIAGNOSTICS + BIOTECHNOLOGY_GENOMICS -> Known.BIOTECHNOLOGY_GENOMICS + DIGITAL_HEALTH_TELEMEDICINE -> Known.DIGITAL_HEALTH_TELEMEDICINE + HEALTH_INSURANCE_BENEFITS_TECH -> Known.HEALTH_INSURANCE_BENEFITS_TECH + CLINICAL_TRIALS_RESEARCH_PLATFORMS -> + Known.CLINICAL_TRIALS_RESEARCH_PLATFORMS + MENTAL_HEALTH_WELLNESS -> Known.MENTAL_HEALTH_WELLNESS + HEALTHCARE_IT_EHR_SYSTEMS -> Known.HEALTHCARE_IT_EHR_SYSTEMS + CONSUMER_HEALTH_WELLNESS_PRODUCTS -> + Known.CONSUMER_HEALTH_WELLNESS_PRODUCTS + ONLINE_MARKETPLACES -> Known.ONLINE_MARKETPLACES + DIRECT_TO_CONSUMER_DTC_BRANDS -> Known.DIRECT_TO_CONSUMER_DTC_BRANDS + RETAIL_TECH_POINT_OF_SALE_SYSTEMS -> + Known.RETAIL_TECH_POINT_OF_SALE_SYSTEMS + OMNICHANNEL_IN_STORE_RETAIL -> Known.OMNICHANNEL_IN_STORE_RETAIL + E_COMMERCE_ENABLEMENT_INFRASTRUCTURE -> + Known.E_COMMERCE_ENABLEMENT_INFRASTRUCTURE + SUBSCRIPTION_MEMBERSHIP_COMMERCE -> + Known.SUBSCRIPTION_MEMBERSHIP_COMMERCE + SOCIAL_COMMERCE_INFLUENCER_PLATFORMS -> + Known.SOCIAL_COMMERCE_INFLUENCER_PLATFORMS + FASHION_APPAREL_RETAIL -> Known.FASHION_APPAREL_RETAIL + FOOD_BEVERAGE_GROCERY_E_COMMERCE -> + Known.FOOD_BEVERAGE_GROCERY_E_COMMERCE + STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO -> + Known.STREAMING_PLATFORMS_VIDEO_MUSIC_AUDIO + GAMING_INTERACTIVE_ENTERTAINMENT -> + Known.GAMING_INTERACTIVE_ENTERTAINMENT + CREATOR_ECONOMY_INFLUENCER_PLATFORMS -> + Known.CREATOR_ECONOMY_INFLUENCER_PLATFORMS + ADVERTISING_ADTECH_MEDIA_BUYING -> Known.ADVERTISING_ADTECH_MEDIA_BUYING + FILM_TV_PRODUCTION_STUDIOS -> Known.FILM_TV_PRODUCTION_STUDIOS + EVENTS_VENUES_LIVE_ENTERTAINMENT -> + Known.EVENTS_VENUES_LIVE_ENTERTAINMENT + VIRTUAL_WORLDS_METAVERSE_EXPERIENCES -> + Known.VIRTUAL_WORLDS_METAVERSE_EXPERIENCES + K_12_EDUCATION_PLATFORMS_TOOLS -> Known.K_12_EDUCATION_PLATFORMS_TOOLS + HIGHER_EDUCATION_UNIVERSITY_TECH -> + Known.HIGHER_EDUCATION_UNIVERSITY_TECH + ONLINE_LEARNING_MOO_CS -> Known.ONLINE_LEARNING_MOO_CS + TEST_PREP_CERTIFICATION -> Known.TEST_PREP_CERTIFICATION + CORPORATE_TRAINING_UPSKILLING -> Known.CORPORATE_TRAINING_UPSKILLING + TUTORING_SUPPLEMENTAL_LEARNING -> Known.TUTORING_SUPPLEMENTAL_LEARNING + EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS -> + Known.EDUCATION_MANAGEMENT_SYSTEMS_LMS_SIS + LANGUAGE_LEARNING -> Known.LANGUAGE_LEARNING + CREATOR_LED_COHORT_BASED_COURSES -> + Known.CREATOR_LED_COHORT_BASED_COURSES + SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS -> + Known.SPECIAL_EDUCATION_ACCESSIBILITY_TOOLS + GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES -> + Known.GOVERNMENT_TECHNOLOGY_DIGITAL_SERVICES + CIVIC_ENGAGEMENT_POLICY_PLATFORMS -> + Known.CIVIC_ENGAGEMENT_POLICY_PLATFORMS + INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID -> + Known.INTERNATIONAL_DEVELOPMENT_HUMANITARIAN_AID + PHILANTHROPY_GRANTMAKING -> Known.PHILANTHROPY_GRANTMAKING + NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS -> + Known.NONPROFIT_OPERATIONS_FUNDRAISING_TOOLS + PUBLIC_HEALTH_SOCIAL_SERVICES -> Known.PUBLIC_HEALTH_SOCIAL_SERVICES + EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS -> + Known.EDUCATION_YOUTH_DEVELOPMENT_PROGRAMS + ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS -> + Known.ENVIRONMENTAL_CLIMATE_ACTION_ORGANIZATIONS + LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY -> + Known.LEGAL_AID_SOCIAL_JUSTICE_ADVOCACY + MUNICIPAL_INFRASTRUCTURE_SERVICES -> + Known.MUNICIPAL_INFRASTRUCTURE_SERVICES + MANUFACTURING_INDUSTRIAL_AUTOMATION -> + Known.MANUFACTURING_INDUSTRIAL_AUTOMATION + ENERGY_PRODUCTION_OIL_GAS_NUCLEAR -> + Known.ENERGY_PRODUCTION_OIL_GAS_NUCLEAR + RENEWABLE_ENERGY_CLEANTECH -> Known.RENEWABLE_ENERGY_CLEANTECH + UTILITIES_GRID_INFRASTRUCTURE -> Known.UTILITIES_GRID_INFRASTRUCTURE + INDUSTRIAL_IO_T_MONITORING_SYSTEMS -> + Known.INDUSTRIAL_IO_T_MONITORING_SYSTEMS + CONSTRUCTION_HEAVY_EQUIPMENT -> Known.CONSTRUCTION_HEAVY_EQUIPMENT + MINING_NATURAL_RESOURCES -> Known.MINING_NATURAL_RESOURCES + ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY -> + Known.ENVIRONMENTAL_ENGINEERING_SUSTAINABILITY + ENERGY_STORAGE_BATTERY_TECHNOLOGY -> + Known.ENERGY_STORAGE_BATTERY_TECHNOLOGY + AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING -> + Known.AUTOMOTIVE_OE_MS_VEHICLE_MANUFACTURING + ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE -> + Known.ELECTRIC_VEHICLES_E_VS_CHARGING_INFRASTRUCTURE + MOBILITY_AS_A_SERVICE_MAA_S -> Known.MOBILITY_AS_A_SERVICE_MAA_S + FLEET_MANAGEMENT -> Known.FLEET_MANAGEMENT + PUBLIC_TRANSIT_URBAN_MOBILITY -> Known.PUBLIC_TRANSIT_URBAN_MOBILITY + AUTONOMOUS_VEHICLES_ADAS -> Known.AUTONOMOUS_VEHICLES_ADAS + AFTERMARKET_PARTS_SERVICES -> Known.AFTERMARKET_PARTS_SERVICES + TELEMATICS_VEHICLE_CONNECTIVITY -> Known.TELEMATICS_VEHICLE_CONNECTIVITY + AVIATION_AEROSPACE_TRANSPORT -> Known.AVIATION_AEROSPACE_TRANSPORT + MARITIME_SHIPPING -> Known.MARITIME_SHIPPING + FITNESS_WELLNESS -> Known.FITNESS_WELLNESS + BEAUTY_PERSONAL_CARE -> Known.BEAUTY_PERSONAL_CARE + HOME_LIVING -> Known.HOME_LIVING + DATING_RELATIONSHIPS -> Known.DATING_RELATIONSHIPS + HOBBIES_CRAFTS_DIY -> Known.HOBBIES_CRAFTS_DIY + OUTDOOR_RECREATIONAL_GEAR -> Known.OUTDOOR_RECREATIONAL_GEAR + EVENTS_EXPERIENCES_TICKETING_PLATFORMS -> + Known.EVENTS_EXPERIENCES_TICKETING_PLATFORMS + DESIGNER_LUXURY_APPAREL -> Known.DESIGNER_LUXURY_APPAREL + ACCESSORIES_JEWELRY_WATCHES -> Known.ACCESSORIES_JEWELRY_WATCHES + FOOTWEAR_LEATHER_GOODS -> Known.FOOTWEAR_LEATHER_GOODS + BEAUTY_FRAGRANCE_SKINCARE -> Known.BEAUTY_FRAGRANCE_SKINCARE + FASHION_MARKETPLACES_RETAIL_PLATFORMS -> + Known.FASHION_MARKETPLACES_RETAIL_PLATFORMS + SUSTAINABLE_ETHICAL_FASHION -> Known.SUSTAINABLE_ETHICAL_FASHION + RESALE_VINTAGE_CIRCULAR_FASHION -> Known.RESALE_VINTAGE_CIRCULAR_FASHION + FASHION_TECH_VIRTUAL_TRY_ONS -> Known.FASHION_TECH_VIRTUAL_TRY_ONS + STREETWEAR_EMERGING_LUXURY -> Known.STREETWEAR_EMERGING_LUXURY + COUTURE_MADE_TO_MEASURE -> Known.COUTURE_MADE_TO_MEASURE + NEWS_PUBLISHING_JOURNALISM -> Known.NEWS_PUBLISHING_JOURNALISM + DIGITAL_MEDIA_CONTENT_PLATFORMS -> Known.DIGITAL_MEDIA_CONTENT_PLATFORMS + BROADCASTING_TV_RADIO -> Known.BROADCASTING_TV_RADIO + PODCASTING_AUDIO_MEDIA -> Known.PODCASTING_AUDIO_MEDIA + NEWS_AGGREGATORS_CURATION_TOOLS -> Known.NEWS_AGGREGATORS_CURATION_TOOLS + INDEPENDENT_CREATOR_LED_MEDIA -> Known.INDEPENDENT_CREATOR_LED_MEDIA + NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS -> + Known.NEWSLETTERS_SUBSTACK_STYLE_PLATFORMS + POLITICAL_INVESTIGATIVE_MEDIA -> Known.POLITICAL_INVESTIGATIVE_MEDIA + TRADE_NICHE_PUBLICATIONS -> Known.TRADE_NICHE_PUBLICATIONS + MEDIA_MONITORING_ANALYTICS -> Known.MEDIA_MONITORING_ANALYTICS + PROFESSIONAL_TEAMS_LEAGUES -> Known.PROFESSIONAL_TEAMS_LEAGUES + SPORTS_MEDIA_BROADCASTING -> Known.SPORTS_MEDIA_BROADCASTING + SPORTS_BETTING_FANTASY_SPORTS -> Known.SPORTS_BETTING_FANTASY_SPORTS + FITNESS_ATHLETIC_TRAINING_PLATFORMS -> + Known.FITNESS_ATHLETIC_TRAINING_PLATFORMS + SPORTSWEAR_EQUIPMENT -> Known.SPORTSWEAR_EQUIPMENT + ESPORTS_COMPETITIVE_GAMING -> Known.ESPORTS_COMPETITIVE_GAMING + SPORTS_VENUES_EVENT_MANAGEMENT -> Known.SPORTS_VENUES_EVENT_MANAGEMENT + ATHLETE_MANAGEMENT_TALENT_AGENCIES -> + Known.ATHLETE_MANAGEMENT_TALENT_AGENCIES + SPORTS_TECH_PERFORMANCE_ANALYTICS -> + Known.SPORTS_TECH_PERFORMANCE_ANALYTICS + YOUTH_AMATEUR_COLLEGIATE_SPORTS -> Known.YOUTH_AMATEUR_COLLEGIATE_SPORTS + REAL_ESTATE_MARKETPLACES -> Known.REAL_ESTATE_MARKETPLACES + PROPERTY_MANAGEMENT_SOFTWARE -> Known.PROPERTY_MANAGEMENT_SOFTWARE + RENTAL_PLATFORMS -> Known.RENTAL_PLATFORMS + MORTGAGE_LENDING_TECH -> Known.MORTGAGE_LENDING_TECH + REAL_ESTATE_INVESTMENT_PLATFORMS -> + Known.REAL_ESTATE_INVESTMENT_PLATFORMS + LAW_FIRMS_LEGAL_SERVICES -> Known.LAW_FIRMS_LEGAL_SERVICES + LEGAL_TECH_AUTOMATION -> Known.LEGAL_TECH_AUTOMATION + REGULATORY_COMPLIANCE -> Known.REGULATORY_COMPLIANCE + E_DISCOVERY_LITIGATION_TOOLS -> Known.E_DISCOVERY_LITIGATION_TOOLS + CONTRACT_MANAGEMENT -> Known.CONTRACT_MANAGEMENT + GOVERNANCE_RISK_COMPLIANCE_GRC -> Known.GOVERNANCE_RISK_COMPLIANCE_GRC + IP_TRADEMARK_MANAGEMENT -> Known.IP_TRADEMARK_MANAGEMENT + LEGAL_RESEARCH_INTELLIGENCE -> Known.LEGAL_RESEARCH_INTELLIGENCE + COMPLIANCE_TRAINING_CERTIFICATION -> + Known.COMPLIANCE_TRAINING_CERTIFICATION + WHISTLEBLOWER_ETHICS_REPORTING -> Known.WHISTLEBLOWER_ETHICS_REPORTING + MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G -> + Known.MOBILE_WIRELESS_NETWORKS_3_G_4_G_5_G + BROADBAND_FIBER_INTERNET -> Known.BROADBAND_FIBER_INTERNET + SATELLITE_SPACE_BASED_COMMUNICATIONS -> + Known.SATELLITE_SPACE_BASED_COMMUNICATIONS + NETWORK_EQUIPMENT_INFRASTRUCTURE -> + Known.NETWORK_EQUIPMENT_INFRASTRUCTURE + TELECOM_BILLING_OSS_BSS_SYSTEMS -> Known.TELECOM_BILLING_OSS_BSS_SYSTEMS + VO_IP_UNIFIED_COMMUNICATIONS -> Known.VO_IP_UNIFIED_COMMUNICATIONS + INTERNET_SERVICE_PROVIDERS_IS_PS -> + Known.INTERNET_SERVICE_PROVIDERS_IS_PS + EDGE_COMPUTING_NETWORK_VIRTUALIZATION -> + Known.EDGE_COMPUTING_NETWORK_VIRTUALIZATION + IO_T_CONNECTIVITY_PLATFORMS -> Known.IO_T_CONNECTIVITY_PLATFORMS + PRECISION_AGRICULTURE_AG_TECH -> Known.PRECISION_AGRICULTURE_AG_TECH + CROP_LIVESTOCK_PRODUCTION -> Known.CROP_LIVESTOCK_PRODUCTION + FOOD_BEVERAGE_MANUFACTURING_PROCESSING -> + Known.FOOD_BEVERAGE_MANUFACTURING_PROCESSING + FOOD_DISTRIBUTION -> Known.FOOD_DISTRIBUTION + RESTAURANTS_FOOD_SERVICE -> Known.RESTAURANTS_FOOD_SERVICE + AGRICULTURAL_INPUTS_EQUIPMENT -> Known.AGRICULTURAL_INPUTS_EQUIPMENT + SUSTAINABLE_REGENERATIVE_AGRICULTURE -> + Known.SUSTAINABLE_REGENERATIVE_AGRICULTURE + SEAFOOD_AQUACULTURE -> Known.SEAFOOD_AQUACULTURE + MANAGEMENT_CONSULTING -> Known.MANAGEMENT_CONSULTING + MARKETING_ADVERTISING_AGENCIES -> Known.MARKETING_ADVERTISING_AGENCIES + DESIGN_BRANDING_CREATIVE_STUDIOS -> + Known.DESIGN_BRANDING_CREATIVE_STUDIOS + IT_SERVICES_MANAGED_SERVICES -> Known.IT_SERVICES_MANAGED_SERVICES + STAFFING_RECRUITING_TALENT -> Known.STAFFING_RECRUITING_TALENT + ACCOUNTING_TAX_FIRMS -> Known.ACCOUNTING_TAX_FIRMS + PUBLIC_RELATIONS_COMMUNICATIONS -> Known.PUBLIC_RELATIONS_COMMUNICATIONS + BUSINESS_PROCESS_OUTSOURCING_BPO -> + Known.BUSINESS_PROCESS_OUTSOURCING_BPO + PROFESSIONAL_TRAINING_COACHING -> Known.PROFESSIONAL_TRAINING_COACHING + SPECIALTY_CHEMICALS -> Known.SPECIALTY_CHEMICALS + COMMODITY_PETROCHEMICALS -> Known.COMMODITY_PETROCHEMICALS + POLYMERS_PLASTICS_RUBBER -> Known.POLYMERS_PLASTICS_RUBBER + COATINGS_ADHESIVES_SEALANTS -> Known.COATINGS_ADHESIVES_SEALANTS + INDUSTRIAL_GASES -> Known.INDUSTRIAL_GASES + ADVANCED_MATERIALS_COMPOSITES -> Known.ADVANCED_MATERIALS_COMPOSITES + BATTERY_MATERIALS_ENERGY_STORAGE -> + Known.BATTERY_MATERIALS_ENERGY_STORAGE + ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS -> + Known.ELECTRONIC_MATERIALS_SEMICONDUCTOR_CHEMICALS + AGROCHEMICALS_FERTILIZERS -> Known.AGROCHEMICALS_FERTILIZERS + FREIGHT_TRANSPORTATION_TECH -> Known.FREIGHT_TRANSPORTATION_TECH + LAST_MILE_DELIVERY -> Known.LAST_MILE_DELIVERY + WAREHOUSE_AUTOMATION -> Known.WAREHOUSE_AUTOMATION + SUPPLY_CHAIN_VISIBILITY_PLATFORMS -> + Known.SUPPLY_CHAIN_VISIBILITY_PLATFORMS + LOGISTICS_MARKETPLACES -> Known.LOGISTICS_MARKETPLACES + SHIPPING_FREIGHT_FORWARDING -> Known.SHIPPING_FREIGHT_FORWARDING + COLD_CHAIN_LOGISTICS -> Known.COLD_CHAIN_LOGISTICS + REVERSE_LOGISTICS_RETURNS -> Known.REVERSE_LOGISTICS_RETURNS + CROSS_BORDER_TRADE_TECH -> Known.CROSS_BORDER_TRADE_TECH + TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS -> + Known.TRANSPORTATION_MANAGEMENT_SYSTEMS_TMS + HOTELS_ACCOMMODATION -> Known.HOTELS_ACCOMMODATION + VACATION_RENTALS_SHORT_TERM_STAYS -> + Known.VACATION_RENTALS_SHORT_TERM_STAYS + RESTAURANT_TECH_MANAGEMENT -> Known.RESTAURANT_TECH_MANAGEMENT + TRAVEL_BOOKING_PLATFORMS -> Known.TRAVEL_BOOKING_PLATFORMS + TOURISM_EXPERIENCES_ACTIVITIES -> Known.TOURISM_EXPERIENCES_ACTIVITIES + CRUISE_LINES_MARINE_TOURISM -> Known.CRUISE_LINES_MARINE_TOURISM + HOSPITALITY_MANAGEMENT_SYSTEMS -> Known.HOSPITALITY_MANAGEMENT_SYSTEMS + EVENT_VENUE_MANAGEMENT -> Known.EVENT_VENUE_MANAGEMENT + CORPORATE_TRAVEL_MANAGEMENT -> Known.CORPORATE_TRAVEL_MANAGEMENT + TRAVEL_INSURANCE_PROTECTION -> Known.TRAVEL_INSURANCE_PROTECTION + CONSTRUCTION_MANAGEMENT_SOFTWARE -> + Known.CONSTRUCTION_MANAGEMENT_SOFTWARE + BIM_CAD_DESIGN_TOOLS -> Known.BIM_CAD_DESIGN_TOOLS + CONSTRUCTION_MARKETPLACES -> Known.CONSTRUCTION_MARKETPLACES + EQUIPMENT_RENTAL_MANAGEMENT -> Known.EQUIPMENT_RENTAL_MANAGEMENT + BUILDING_MATERIALS_PROCUREMENT -> Known.BUILDING_MATERIALS_PROCUREMENT + CONSTRUCTION_WORKFORCE_MANAGEMENT -> + Known.CONSTRUCTION_WORKFORCE_MANAGEMENT + PROJECT_ESTIMATION_BIDDING -> Known.PROJECT_ESTIMATION_BIDDING + MODULAR_PREFAB_CONSTRUCTION -> Known.MODULAR_PREFAB_CONSTRUCTION + CONSTRUCTION_SAFETY_COMPLIANCE -> Known.CONSTRUCTION_SAFETY_COMPLIANCE + SMART_BUILDING_TECHNOLOGY -> Known.SMART_BUILDING_TECHNOLOGY + FOOD_BEVERAGE_CPG -> Known.FOOD_BEVERAGE_CPG + HOME_PERSONAL_CARE_CPG -> Known.HOME_PERSONAL_CARE_CPG + CPG_ANALYTICS_INSIGHTS -> Known.CPG_ANALYTICS_INSIGHTS + DIRECT_TO_CONSUMER_CPG_BRANDS -> Known.DIRECT_TO_CONSUMER_CPG_BRANDS + CPG_SUPPLY_CHAIN_DISTRIBUTION -> Known.CPG_SUPPLY_CHAIN_DISTRIBUTION + PRIVATE_LABEL_MANUFACTURING -> Known.PRIVATE_LABEL_MANUFACTURING + CPG_RETAIL_INTELLIGENCE -> Known.CPG_RETAIL_INTELLIGENCE + SUSTAINABLE_CPG_PACKAGING -> Known.SUSTAINABLE_CPG_PACKAGING + BEAUTY_COSMETICS_CPG -> Known.BEAUTY_COSMETICS_CPG + HEALTH_WELLNESS_CPG -> Known.HEALTH_WELLNESS_CPG + else -> + throw BrandDevInvalidDataException("Unknown Subindustry: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not + * have the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Subindustry = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Subindustry && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Eic && + industry == other.industry && + subindustry == other.subindustry && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(industry, subindustry, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Eic{industry=$industry, subindustry=$subindustry, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Industries && + eic == other.eic && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(eic, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Industries{eic=$eic, additionalProperties=$additionalProperties}" + } + + /** Important website links for the brand */ + class Links + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val blog: JsonField, + private val careers: JsonField, + private val contact: JsonField, + private val pricing: JsonField, + private val privacy: JsonField, + private val terms: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("blog") @ExcludeMissing blog: JsonField = JsonMissing.of(), + @JsonProperty("careers") + @ExcludeMissing + careers: JsonField = JsonMissing.of(), + @JsonProperty("contact") + @ExcludeMissing + contact: JsonField = JsonMissing.of(), + @JsonProperty("pricing") + @ExcludeMissing + pricing: JsonField = JsonMissing.of(), + @JsonProperty("privacy") + @ExcludeMissing + privacy: JsonField = JsonMissing.of(), + @JsonProperty("terms") @ExcludeMissing terms: JsonField = JsonMissing.of(), + ) : this(blog, careers, contact, pricing, privacy, terms, mutableMapOf()) + + /** + * URL to the brand's blog or news page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun blog(): Optional = blog.getOptional("blog") + + /** + * URL to the brand's careers or job opportunities page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun careers(): Optional = careers.getOptional("careers") + + /** + * URL to the brand's contact or contact us page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun contact(): Optional = contact.getOptional("contact") + + /** + * URL to the brand's pricing or plans page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun pricing(): Optional = pricing.getOptional("pricing") + + /** + * URL to the brand's privacy policy page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun privacy(): Optional = privacy.getOptional("privacy") + + /** + * URL to the brand's terms of service or terms and conditions page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun terms(): Optional = terms.getOptional("terms") + + /** + * Returns the raw JSON value of [blog]. + * + * Unlike [blog], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("blog") @ExcludeMissing fun _blog(): JsonField = blog + + /** + * Returns the raw JSON value of [careers]. + * + * Unlike [careers], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("careers") @ExcludeMissing fun _careers(): JsonField = careers + + /** + * Returns the raw JSON value of [contact]. + * + * Unlike [contact], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("contact") @ExcludeMissing fun _contact(): JsonField = contact + + /** + * Returns the raw JSON value of [pricing]. + * + * Unlike [pricing], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("pricing") @ExcludeMissing fun _pricing(): JsonField = pricing + + /** + * Returns the raw JSON value of [privacy]. + * + * Unlike [privacy], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("privacy") @ExcludeMissing fun _privacy(): JsonField = privacy + + /** + * Returns the raw JSON value of [terms]. + * + * Unlike [terms], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("terms") @ExcludeMissing fun _terms(): JsonField = terms + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Links]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Links]. */ + class Builder internal constructor() { + + private var blog: JsonField = JsonMissing.of() + private var careers: JsonField = JsonMissing.of() + private var contact: JsonField = JsonMissing.of() + private var pricing: JsonField = JsonMissing.of() + private var privacy: JsonField = JsonMissing.of() + private var terms: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(links: Links) = apply { + blog = links.blog + careers = links.careers + contact = links.contact + pricing = links.pricing + privacy = links.privacy + terms = links.terms + additionalProperties = links.additionalProperties.toMutableMap() + } + + /** URL to the brand's blog or news page */ + fun blog(blog: String?) = blog(JsonField.ofNullable(blog)) + + /** Alias for calling [Builder.blog] with `blog.orElse(null)`. */ + fun blog(blog: Optional) = blog(blog.getOrNull()) + + /** + * Sets [Builder.blog] to an arbitrary JSON value. + * + * You should usually call [Builder.blog] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun blog(blog: JsonField) = apply { this.blog = blog } + + /** URL to the brand's careers or job opportunities page */ + fun careers(careers: String?) = careers(JsonField.ofNullable(careers)) + + /** Alias for calling [Builder.careers] with `careers.orElse(null)`. */ + fun careers(careers: Optional) = careers(careers.getOrNull()) + + /** + * Sets [Builder.careers] to an arbitrary JSON value. + * + * You should usually call [Builder.careers] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun careers(careers: JsonField) = apply { this.careers = careers } + + /** URL to the brand's contact or contact us page */ + fun contact(contact: String?) = contact(JsonField.ofNullable(contact)) + + /** Alias for calling [Builder.contact] with `contact.orElse(null)`. */ + fun contact(contact: Optional) = contact(contact.getOrNull()) + + /** + * Sets [Builder.contact] to an arbitrary JSON value. + * + * You should usually call [Builder.contact] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun contact(contact: JsonField) = apply { this.contact = contact } + + /** URL to the brand's pricing or plans page */ + fun pricing(pricing: String?) = pricing(JsonField.ofNullable(pricing)) + + /** Alias for calling [Builder.pricing] with `pricing.orElse(null)`. */ + fun pricing(pricing: Optional) = pricing(pricing.getOrNull()) + + /** + * Sets [Builder.pricing] to an arbitrary JSON value. + * + * You should usually call [Builder.pricing] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun pricing(pricing: JsonField) = apply { this.pricing = pricing } + + /** URL to the brand's privacy policy page */ + fun privacy(privacy: String?) = privacy(JsonField.ofNullable(privacy)) + + /** Alias for calling [Builder.privacy] with `privacy.orElse(null)`. */ + fun privacy(privacy: Optional) = privacy(privacy.getOrNull()) + + /** + * Sets [Builder.privacy] to an arbitrary JSON value. + * + * You should usually call [Builder.privacy] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun privacy(privacy: JsonField) = apply { this.privacy = privacy } + + /** URL to the brand's terms of service or terms and conditions page */ + fun terms(terms: String?) = terms(JsonField.ofNullable(terms)) + + /** Alias for calling [Builder.terms] with `terms.orElse(null)`. */ + fun terms(terms: Optional) = terms(terms.getOrNull()) + + /** + * Sets [Builder.terms] to an arbitrary JSON value. + * + * You should usually call [Builder.terms] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun terms(terms: JsonField) = apply { this.terms = terms } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Links]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Links = + Links( + blog, + careers, + contact, + pricing, + privacy, + terms, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Links = apply { + if (validated) { + return@apply + } + + blog() + careers() + contact() + pricing() + privacy() + terms() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (blog.asKnown().isPresent) 1 else 0) + + (if (careers.asKnown().isPresent) 1 else 0) + + (if (contact.asKnown().isPresent) 1 else 0) + + (if (pricing.asKnown().isPresent) 1 else 0) + + (if (privacy.asKnown().isPresent) 1 else 0) + + (if (terms.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Links && + blog == other.blog && + careers == other.careers && + contact == other.contact && + pricing == other.pricing && + privacy == other.privacy && + terms == other.terms && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(blog, careers, contact, pricing, privacy, terms, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Links{blog=$blog, careers=$careers, contact=$contact, pricing=$pricing, privacy=$privacy, terms=$terms, additionalProperties=$additionalProperties}" + } + + class Logo + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val colors: JsonField>, + private val mode: JsonField, + private val resolution: JsonField, + private val type: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("colors") + @ExcludeMissing + colors: JsonField> = JsonMissing.of(), + @JsonProperty("mode") @ExcludeMissing mode: JsonField = JsonMissing.of(), + @JsonProperty("resolution") + @ExcludeMissing + resolution: JsonField = JsonMissing.of(), + @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(colors, mode, resolution, type, url, mutableMapOf()) + + /** + * Array of colors in the logo + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun colors(): Optional> = colors.getOptional("colors") + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = best + * for dark mode, 'has_opaque_background' = can be used for either as image has its own + * background + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun mode(): Optional = mode.getOptional("mode") + + /** + * Resolution of the logo image + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun resolution(): Optional = resolution.getOptional("resolution") + + /** + * Type of the logo based on resolution (e.g., 'icon', 'logo') + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun type(): Optional = type.getOptional("type") + + /** + * CDN hosted url of the logo (ready for display) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [colors]. + * + * Unlike [colors], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("colors") @ExcludeMissing fun _colors(): JsonField> = colors + + /** + * Returns the raw JSON value of [mode]. + * + * Unlike [mode], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("mode") @ExcludeMissing fun _mode(): JsonField = mode + + /** + * Returns the raw JSON value of [resolution]. + * + * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("resolution") + @ExcludeMissing + fun _resolution(): JsonField = resolution + + /** + * Returns the raw JSON value of [type]. + * + * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Logo]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Logo]. */ + class Builder internal constructor() { + + private var colors: JsonField>? = null + private var mode: JsonField = JsonMissing.of() + private var resolution: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(logo: Logo) = apply { + colors = logo.colors.map { it.toMutableList() } + mode = logo.mode + resolution = logo.resolution + type = logo.type + url = logo.url + additionalProperties = logo.additionalProperties.toMutableMap() + } + + /** Array of colors in the logo */ + fun colors(colors: List) = colors(JsonField.of(colors)) + + /** + * Sets [Builder.colors] to an arbitrary JSON value. + * + * You should usually call [Builder.colors] with a well-typed `List` value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun colors(colors: JsonField>) = apply { + this.colors = colors.map { it.toMutableList() } + } + + /** + * Adds a single [Color] to [colors]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addColor(color: Color) = apply { + colors = + (colors ?: JsonField.of(mutableListOf())).also { + checkKnown("colors", it).add(color) + } + } + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = + * best for dark mode, 'has_opaque_background' = can be used for either as image has + * its own background + */ + fun mode(mode: Mode) = mode(JsonField.of(mode)) + + /** + * Sets [Builder.mode] to an arbitrary JSON value. + * + * You should usually call [Builder.mode] with a well-typed [Mode] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun mode(mode: JsonField) = apply { this.mode = mode } + + /** Resolution of the logo image */ + fun resolution(resolution: Resolution) = resolution(JsonField.of(resolution)) + + /** + * Sets [Builder.resolution] to an arbitrary JSON value. + * + * You should usually call [Builder.resolution] with a well-typed [Resolution] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun resolution(resolution: JsonField) = apply { + this.resolution = resolution + } + + /** Type of the logo based on resolution (e.g., 'icon', 'logo') */ + fun type(type: Type) = type(JsonField.of(type)) + + /** + * Sets [Builder.type] to an arbitrary JSON value. + * + * You should usually call [Builder.type] with a well-typed [Type] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun type(type: JsonField) = apply { this.type = type } + + /** CDN hosted url of the logo (ready for display) */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Logo]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Logo = + Logo( + (colors ?: JsonMissing.of()).map { it.toImmutable() }, + mode, + resolution, + type, + url, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Logo = apply { + if (validated) { + return@apply + } + + colors().ifPresent { it.forEach { it.validate() } } + mode().ifPresent { it.validate() } + resolution().ifPresent { it.validate() } + type().ifPresent { it.validate() } + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (colors.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (mode.asKnown().getOrNull()?.validity() ?: 0) + + (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (type.asKnown().getOrNull()?.validity() ?: 0) + + (if (url.asKnown().isPresent) 1 else 0) + + class Color + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val hex: JsonField, + private val name: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("hex") @ExcludeMissing hex: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + ) : this(hex, name, mutableMapOf()) + + /** + * Color in hexadecimal format + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun hex(): Optional = hex.getOptional("hex") + + /** + * Name of the color + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun name(): Optional = name.getOptional("name") + + /** + * Returns the raw JSON value of [hex]. + * + * Unlike [hex], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("hex") @ExcludeMissing fun _hex(): JsonField = hex + + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Color]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Color]. */ + class Builder internal constructor() { + + private var hex: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(color: Color) = apply { + hex = color.hex + name = color.name + additionalProperties = color.additionalProperties.toMutableMap() + } + + /** Color in hexadecimal format */ + fun hex(hex: String) = hex(JsonField.of(hex)) + + /** + * Sets [Builder.hex] to an arbitrary JSON value. + * + * You should usually call [Builder.hex] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun hex(hex: JsonField) = apply { this.hex = hex } + + /** Name of the color */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Color]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Color = Color(hex, name, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Color = apply { + if (validated) { + return@apply + } + + hex() + name() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (hex.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Color && + hex == other.hex && + name == other.name && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(hex, name, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Color{hex=$hex, name=$name, additionalProperties=$additionalProperties}" + } + + /** + * Indicates when this logo is best used: 'light' = best for light mode, 'dark' = best + * for dark mode, 'has_opaque_background' = can be used for either as image has its own + * background + */ + class Mode @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val LIGHT = of("light") + + @JvmField val DARK = of("dark") + + @JvmField val HAS_OPAQUE_BACKGROUND = of("has_opaque_background") + + @JvmStatic fun of(value: String) = Mode(JsonField.of(value)) + } + + /** An enum containing [Mode]'s known values. */ + enum class Known { + LIGHT, + DARK, + HAS_OPAQUE_BACKGROUND, + } + + /** + * An enum containing [Mode]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Mode] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + LIGHT, + DARK, + HAS_OPAQUE_BACKGROUND, + /** + * An enum member indicating that [Mode] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + LIGHT -> Value.LIGHT + DARK -> Value.DARK + HAS_OPAQUE_BACKGROUND -> Value.HAS_OPAQUE_BACKGROUND + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + LIGHT -> Known.LIGHT + DARK -> Known.DARK + HAS_OPAQUE_BACKGROUND -> Known.HAS_OPAQUE_BACKGROUND + else -> throw BrandDevInvalidDataException("Unknown Mode: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Mode = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Mode && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** Resolution of the logo image */ + class Resolution + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val aspectRatio: JsonField, + private val height: JsonField, + private val width: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("aspect_ratio") + @ExcludeMissing + aspectRatio: JsonField = JsonMissing.of(), + @JsonProperty("height") + @ExcludeMissing + height: JsonField = JsonMissing.of(), + @JsonProperty("width") @ExcludeMissing width: JsonField = JsonMissing.of(), + ) : this(aspectRatio, height, width, mutableMapOf()) + + /** + * Aspect ratio of the image (width/height) + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun aspectRatio(): Optional = aspectRatio.getOptional("aspect_ratio") + + /** + * Height of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun height(): Optional = height.getOptional("height") + + /** + * Width of the image in pixels + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type + * (e.g. if the server responded with an unexpected value). + */ + fun width(): Optional = width.getOptional("width") + + /** + * Returns the raw JSON value of [aspectRatio]. + * + * Unlike [aspectRatio], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("aspect_ratio") + @ExcludeMissing + fun _aspectRatio(): JsonField = aspectRatio + + /** + * Returns the raw JSON value of [height]. + * + * Unlike [height], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("height") @ExcludeMissing fun _height(): JsonField = height + + /** + * Returns the raw JSON value of [width]. + * + * Unlike [width], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("width") @ExcludeMissing fun _width(): JsonField = width + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Resolution]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Resolution]. */ + class Builder internal constructor() { + + private var aspectRatio: JsonField = JsonMissing.of() + private var height: JsonField = JsonMissing.of() + private var width: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(resolution: Resolution) = apply { + aspectRatio = resolution.aspectRatio + height = resolution.height + width = resolution.width + additionalProperties = resolution.additionalProperties.toMutableMap() + } + + /** Aspect ratio of the image (width/height) */ + fun aspectRatio(aspectRatio: Double) = aspectRatio(JsonField.of(aspectRatio)) + + /** + * Sets [Builder.aspectRatio] to an arbitrary JSON value. + * + * You should usually call [Builder.aspectRatio] with a well-typed [Double] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun aspectRatio(aspectRatio: JsonField) = apply { + this.aspectRatio = aspectRatio + } + + /** Height of the image in pixels */ + fun height(height: Long) = height(JsonField.of(height)) + + /** + * Sets [Builder.height] to an arbitrary JSON value. + * + * You should usually call [Builder.height] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun height(height: JsonField) = apply { this.height = height } + + /** Width of the image in pixels */ + fun width(width: Long) = width(JsonField.of(width)) + + /** + * Sets [Builder.width] to an arbitrary JSON value. + * + * You should usually call [Builder.width] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun width(width: JsonField) = apply { this.width = width } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Resolution]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Resolution = + Resolution(aspectRatio, height, width, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Resolution = apply { + if (validated) { + return@apply + } + + aspectRatio() + height() + width() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (aspectRatio.asKnown().isPresent) 1 else 0) + + (if (height.asKnown().isPresent) 1 else 0) + + (if (width.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Resolution && + aspectRatio == other.aspectRatio && + height == other.height && + width == other.width && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(aspectRatio, height, width, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Resolution{aspectRatio=$aspectRatio, height=$height, width=$width, additionalProperties=$additionalProperties}" + } + + /** Type of the logo based on resolution (e.g., 'icon', 'logo') */ + class Type @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ICON = of("icon") + + @JvmField val LOGO = of("logo") + + @JvmStatic fun of(value: String) = Type(JsonField.of(value)) + } + + /** An enum containing [Type]'s known values. */ + enum class Known { + ICON, + LOGO, + } + + /** + * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Type] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ICON, + LOGO, + /** + * An enum member indicating that [Type] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ICON -> Value.ICON + LOGO -> Value.LOGO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + ICON -> Known.ICON + LOGO -> Known.LOGO + else -> throw BrandDevInvalidDataException("Unknown Type: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Type = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Type && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Logo && + colors == other.colors && + mode == other.mode && + resolution == other.resolution && + type == other.type && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(colors, mode, resolution, type, url, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Logo{colors=$colors, mode=$mode, resolution=$resolution, type=$type, url=$url, additionalProperties=$additionalProperties}" + } + + class Social + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val type: JsonField, + private val url: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("url") @ExcludeMissing url: JsonField = JsonMissing.of(), + ) : this(type, url, mutableMapOf()) + + /** + * Type of social media, e.g., 'facebook', 'twitter' + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun type(): Optional = type.getOptional("type") + + /** + * URL of the social media page + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun url(): Optional = url.getOptional("url") + + /** + * Returns the raw JSON value of [type]. + * + * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + + /** + * Returns the raw JSON value of [url]. + * + * Unlike [url], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("url") @ExcludeMissing fun _url(): JsonField = url + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Social]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Social]. */ + class Builder internal constructor() { + + private var type: JsonField = JsonMissing.of() + private var url: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(social: Social) = apply { + type = social.type + url = social.url + additionalProperties = social.additionalProperties.toMutableMap() + } + + /** Type of social media, e.g., 'facebook', 'twitter' */ + fun type(type: String) = type(JsonField.of(type)) + + /** + * Sets [Builder.type] to an arbitrary JSON value. + * + * You should usually call [Builder.type] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun type(type: JsonField) = apply { this.type = type } + + /** URL of the social media page */ + fun url(url: String) = url(JsonField.of(url)) + + /** + * Sets [Builder.url] to an arbitrary JSON value. + * + * You should usually call [Builder.url] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun url(url: JsonField) = apply { this.url = url } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Social]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Social = Social(type, url, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Social = apply { + if (validated) { + return@apply + } + + type() + url() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (type.asKnown().isPresent) 1 else 0) + (if (url.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Social && + type == other.type && + url == other.url && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(type, url, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Social{type=$type, url=$url, additionalProperties=$additionalProperties}" + } + + /** + * Stock market information for this brand (will be null if not a publicly traded company) + */ + class Stock + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val exchange: JsonField, + private val ticker: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("exchange") + @ExcludeMissing + exchange: JsonField = JsonMissing.of(), + @JsonProperty("ticker") @ExcludeMissing ticker: JsonField = JsonMissing.of(), + ) : this(exchange, ticker, mutableMapOf()) + + /** + * Stock exchange name + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun exchange(): Optional = exchange.getOptional("exchange") + + /** + * Stock ticker symbol + * + * @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun ticker(): Optional = ticker.getOptional("ticker") + + /** + * Returns the raw JSON value of [exchange]. + * + * Unlike [exchange], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("exchange") @ExcludeMissing fun _exchange(): JsonField = exchange + + /** + * Returns the raw JSON value of [ticker]. + * + * Unlike [ticker], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("ticker") @ExcludeMissing fun _ticker(): JsonField = ticker + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Stock]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Stock]. */ + class Builder internal constructor() { + + private var exchange: JsonField = JsonMissing.of() + private var ticker: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(stock: Stock) = apply { + exchange = stock.exchange + ticker = stock.ticker + additionalProperties = stock.additionalProperties.toMutableMap() + } + + /** Stock exchange name */ + fun exchange(exchange: String) = exchange(JsonField.of(exchange)) + + /** + * Sets [Builder.exchange] to an arbitrary JSON value. + * + * You should usually call [Builder.exchange] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun exchange(exchange: JsonField) = apply { this.exchange = exchange } + + /** Stock ticker symbol */ + fun ticker(ticker: String) = ticker(JsonField.of(ticker)) + + /** + * Sets [Builder.ticker] to an arbitrary JSON value. + * + * You should usually call [Builder.ticker] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun ticker(ticker: JsonField) = apply { this.ticker = ticker } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Stock]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Stock = Stock(exchange, ticker, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Stock = apply { + if (validated) { + return@apply + } + + exchange() + ticker() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (exchange.asKnown().isPresent) 1 else 0) + + (if (ticker.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Stock && + exchange == other.exchange && + ticker == other.ticker && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(exchange, ticker, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Stock{exchange=$exchange, ticker=$ticker, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Brand && + address == other.address && + backdrops == other.backdrops && + colors == other.colors && + description == other.description && + domain == other.domain && + email == other.email && + industries == other.industries && + isNsfw == other.isNsfw && + links == other.links && + logos == other.logos && + phone == other.phone && + slogan == other.slogan && + socials == other.socials && + stock == other.stock && + title == other.title && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + address, + backdrops, + colors, + description, + domain, + email, + industries, + isNsfw, + links, + logos, + phone, + slogan, + socials, + stock, + title, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Brand{address=$address, backdrops=$backdrops, colors=$colors, description=$description, domain=$domain, email=$email, industries=$industries, isNsfw=$isNsfw, links=$links, logos=$logos, phone=$phone, slogan=$slogan, socials=$socials, stock=$stock, title=$title, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is BrandRetrieveByTickerResponse && + brand == other.brand && + code == other.code && + status == other.status && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(brand, code, status, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "BrandRetrieveByTickerResponse{brand=$brand, code=$code, status=$status, additionalProperties=$additionalProperties}" +} diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt index bca6357..cbafb4a 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt @@ -11,6 +11,10 @@ import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionResponse import com.branddev.api.models.brand.BrandPrefetchParams import com.branddev.api.models.brand.BrandPrefetchResponse +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByNameResponse +import com.branddev.api.models.brand.BrandRetrieveByTickerParams +import com.branddev.api.models.brand.BrandRetrieveByTickerResponse import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveNaicsResponse import com.branddev.api.models.brand.BrandRetrieveParams @@ -101,6 +105,36 @@ interface BrandServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture + /** + * Retrieve brand information using a company name. This endpoint searches for the company by + * name and returns its brand data. + */ + fun retrieveByName( + params: BrandRetrieveByNameParams + ): CompletableFuture = + retrieveByName(params, RequestOptions.none()) + + /** @see retrieveByName */ + fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): CompletableFuture + + /** + * Retrieve brand information using a stock ticker symbol. This endpoint looks up the company + * associated with the ticker and returns its brand data. + */ + fun retrieveByTicker( + params: BrandRetrieveByTickerParams + ): CompletableFuture = + retrieveByTicker(params, RequestOptions.none()) + + /** @see retrieveByTicker */ + fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): CompletableFuture + /** Endpoint to classify any brand into a 2022 NAICS code. */ fun retrieveNaics( params: BrandRetrieveNaicsParams @@ -238,6 +272,36 @@ interface BrandServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> + /** + * Returns a raw HTTP response for `get /brand/retrieve-by-name`, but is otherwise the same + * as [BrandServiceAsync.retrieveByName]. + */ + fun retrieveByName( + params: BrandRetrieveByNameParams + ): CompletableFuture> = + retrieveByName(params, RequestOptions.none()) + + /** @see retrieveByName */ + fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): CompletableFuture> + + /** + * Returns a raw HTTP response for `get /brand/retrieve-by-ticker`, but is otherwise the + * same as [BrandServiceAsync.retrieveByTicker]. + */ + fun retrieveByTicker( + params: BrandRetrieveByTickerParams + ): CompletableFuture> = + retrieveByTicker(params, RequestOptions.none()) + + /** @see retrieveByTicker */ + fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): CompletableFuture> + /** * Returns a raw HTTP response for `get /brand/naics`, but is otherwise the same as * [BrandServiceAsync.retrieveNaics]. diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsyncImpl.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsyncImpl.kt index 66cf788..acfdfb0 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsyncImpl.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsyncImpl.kt @@ -21,6 +21,10 @@ import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionResponse import com.branddev.api.models.brand.BrandPrefetchParams import com.branddev.api.models.brand.BrandPrefetchResponse +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByNameResponse +import com.branddev.api.models.brand.BrandRetrieveByTickerParams +import com.branddev.api.models.brand.BrandRetrieveByTickerResponse import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveNaicsResponse import com.branddev.api.models.brand.BrandRetrieveParams @@ -74,6 +78,20 @@ class BrandServiceAsyncImpl internal constructor(private val clientOptions: Clie // post /brand/prefetch withRawResponse().prefetch(params, requestOptions).thenApply { it.parse() } + override fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions, + ): CompletableFuture = + // get /brand/retrieve-by-name + withRawResponse().retrieveByName(params, requestOptions).thenApply { it.parse() } + + override fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions, + ): CompletableFuture = + // get /brand/retrieve-by-ticker + withRawResponse().retrieveByTicker(params, requestOptions).thenApply { it.parse() } + override fun retrieveNaics( params: BrandRetrieveNaicsParams, requestOptions: RequestOptions, @@ -237,6 +255,66 @@ class BrandServiceAsyncImpl internal constructor(private val clientOptions: Clie } } + private val retrieveByNameHandler: Handler = + jsonHandler(clientOptions.jsonMapper) + + override fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions, + ): CompletableFuture> { + val request = + HttpRequest.builder() + .method(HttpMethod.GET) + .baseUrl(clientOptions.baseUrl()) + .addPathSegments("brand", "retrieve-by-name") + .build() + .prepareAsync(clientOptions, params) + val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) + return request + .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenApply { response -> + errorHandler.handle(response).parseable { + response + .use { retrieveByNameHandler.handle(it) } + .also { + if (requestOptions.responseValidation!!) { + it.validate() + } + } + } + } + } + + private val retrieveByTickerHandler: Handler = + jsonHandler(clientOptions.jsonMapper) + + override fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions, + ): CompletableFuture> { + val request = + HttpRequest.builder() + .method(HttpMethod.GET) + .baseUrl(clientOptions.baseUrl()) + .addPathSegments("brand", "retrieve-by-ticker") + .build() + .prepareAsync(clientOptions, params) + val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) + return request + .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenApply { response -> + errorHandler.handle(response).parseable { + response + .use { retrieveByTickerHandler.handle(it) } + .also { + if (requestOptions.responseValidation!!) { + it.validate() + } + } + } + } + } + private val retrieveNaicsHandler: Handler = jsonHandler(clientOptions.jsonMapper) diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt index c595ad2..dfc5f6a 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt @@ -11,6 +11,10 @@ import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionResponse import com.branddev.api.models.brand.BrandPrefetchParams import com.branddev.api.models.brand.BrandPrefetchResponse +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByNameResponse +import com.branddev.api.models.brand.BrandRetrieveByTickerParams +import com.branddev.api.models.brand.BrandRetrieveByTickerResponse import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveNaicsResponse import com.branddev.api.models.brand.BrandRetrieveParams @@ -99,6 +103,32 @@ interface BrandService { requestOptions: RequestOptions = RequestOptions.none(), ): BrandPrefetchResponse + /** + * Retrieve brand information using a company name. This endpoint searches for the company by + * name and returns its brand data. + */ + fun retrieveByName(params: BrandRetrieveByNameParams): BrandRetrieveByNameResponse = + retrieveByName(params, RequestOptions.none()) + + /** @see retrieveByName */ + fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): BrandRetrieveByNameResponse + + /** + * Retrieve brand information using a stock ticker symbol. This endpoint looks up the company + * associated with the ticker and returns its brand data. + */ + fun retrieveByTicker(params: BrandRetrieveByTickerParams): BrandRetrieveByTickerResponse = + retrieveByTicker(params, RequestOptions.none()) + + /** @see retrieveByTicker */ + fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): BrandRetrieveByTickerResponse + /** Endpoint to classify any brand into a 2022 NAICS code. */ fun retrieveNaics(params: BrandRetrieveNaicsParams): BrandRetrieveNaicsResponse = retrieveNaics(params, RequestOptions.none()) @@ -234,6 +264,40 @@ interface BrandService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor + /** + * Returns a raw HTTP response for `get /brand/retrieve-by-name`, but is otherwise the same + * as [BrandService.retrieveByName]. + */ + @MustBeClosed + fun retrieveByName( + params: BrandRetrieveByNameParams + ): HttpResponseFor = + retrieveByName(params, RequestOptions.none()) + + /** @see retrieveByName */ + @MustBeClosed + fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): HttpResponseFor + + /** + * Returns a raw HTTP response for `get /brand/retrieve-by-ticker`, but is otherwise the + * same as [BrandService.retrieveByTicker]. + */ + @MustBeClosed + fun retrieveByTicker( + params: BrandRetrieveByTickerParams + ): HttpResponseFor = + retrieveByTicker(params, RequestOptions.none()) + + /** @see retrieveByTicker */ + @MustBeClosed + fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions = RequestOptions.none(), + ): HttpResponseFor + /** * Returns a raw HTTP response for `get /brand/naics`, but is otherwise the same as * [BrandService.retrieveNaics]. diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandServiceImpl.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandServiceImpl.kt index 206a0e5..e7a0c2a 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandServiceImpl.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandServiceImpl.kt @@ -21,6 +21,10 @@ import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionResponse import com.branddev.api.models.brand.BrandPrefetchParams import com.branddev.api.models.brand.BrandPrefetchResponse +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByNameResponse +import com.branddev.api.models.brand.BrandRetrieveByTickerParams +import com.branddev.api.models.brand.BrandRetrieveByTickerResponse import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveNaicsResponse import com.branddev.api.models.brand.BrandRetrieveParams @@ -73,6 +77,20 @@ class BrandServiceImpl internal constructor(private val clientOptions: ClientOpt // post /brand/prefetch withRawResponse().prefetch(params, requestOptions).parse() + override fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions, + ): BrandRetrieveByNameResponse = + // get /brand/retrieve-by-name + withRawResponse().retrieveByName(params, requestOptions).parse() + + override fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions, + ): BrandRetrieveByTickerResponse = + // get /brand/retrieve-by-ticker + withRawResponse().retrieveByTicker(params, requestOptions).parse() + override fun retrieveNaics( params: BrandRetrieveNaicsParams, requestOptions: RequestOptions, @@ -224,6 +242,60 @@ class BrandServiceImpl internal constructor(private val clientOptions: ClientOpt } } + private val retrieveByNameHandler: Handler = + jsonHandler(clientOptions.jsonMapper) + + override fun retrieveByName( + params: BrandRetrieveByNameParams, + requestOptions: RequestOptions, + ): HttpResponseFor { + val request = + HttpRequest.builder() + .method(HttpMethod.GET) + .baseUrl(clientOptions.baseUrl()) + .addPathSegments("brand", "retrieve-by-name") + .build() + .prepare(clientOptions, params) + val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) + val response = clientOptions.httpClient.execute(request, requestOptions) + return errorHandler.handle(response).parseable { + response + .use { retrieveByNameHandler.handle(it) } + .also { + if (requestOptions.responseValidation!!) { + it.validate() + } + } + } + } + + private val retrieveByTickerHandler: Handler = + jsonHandler(clientOptions.jsonMapper) + + override fun retrieveByTicker( + params: BrandRetrieveByTickerParams, + requestOptions: RequestOptions, + ): HttpResponseFor { + val request = + HttpRequest.builder() + .method(HttpMethod.GET) + .baseUrl(clientOptions.baseUrl()) + .addPathSegments("brand", "retrieve-by-ticker") + .build() + .prepare(clientOptions, params) + val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) + val response = clientOptions.httpClient.execute(request, requestOptions) + return errorHandler.handle(response).parseable { + response + .use { retrieveByTickerHandler.handle(it) } + .also { + if (requestOptions.responseValidation!!) { + it.validate() + } + } + } + } + private val retrieveNaicsHandler: Handler = jsonHandler(clientOptions.jsonMapper) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParamsTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParamsTest.kt new file mode 100644 index 0000000..6a8c443 --- /dev/null +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameParamsTest.kt @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.http.QueryParams +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class BrandRetrieveByNameParamsTest { + + @Test + fun create() { + BrandRetrieveByNameParams.builder() + .name("xxx") + .forceLanguage(BrandRetrieveByNameParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .timeoutMs(1L) + .build() + } + + @Test + fun queryParams() { + val params = + BrandRetrieveByNameParams.builder() + .name("xxx") + .forceLanguage(BrandRetrieveByNameParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .timeoutMs(1L) + .build() + + val queryParams = params._queryParams() + + assertThat(queryParams) + .isEqualTo( + QueryParams.builder() + .put("name", "xxx") + .put("force_language", "albanian") + .put("maxSpeed", "true") + .put("timeoutMS", "1") + .build() + ) + } + + @Test + fun queryParamsWithoutOptionalFields() { + val params = BrandRetrieveByNameParams.builder().name("xxx").build() + + val queryParams = params._queryParams() + + assertThat(queryParams).isEqualTo(QueryParams.builder().put("name", "xxx").build()) + } +} diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponseTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponseTest.kt new file mode 100644 index 0000000..02d20bf --- /dev/null +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByNameResponseTest.kt @@ -0,0 +1,358 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.jsonMapper +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class BrandRetrieveByNameResponseTest { + + @Test + fun create() { + val brandRetrieveByNameResponse = + BrandRetrieveByNameResponse.builder() + .brand( + BrandRetrieveByNameResponse.Brand.builder() + .address( + BrandRetrieveByNameResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByNameResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByNameResponse.Brand.Backdrop.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByNameResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByNameResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByNameResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByNameResponse.Brand.Industries.Eic + .Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByNameResponse.Brand.Industries.Eic + .Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByNameResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByNameResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByNameResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByNameResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByNameResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByNameResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByNameResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + .code(0L) + .status("status") + .build() + + assertThat(brandRetrieveByNameResponse.brand()) + .contains( + BrandRetrieveByNameResponse.Brand.builder() + .address( + BrandRetrieveByNameResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByNameResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByNameResponse.Brand.Backdrop.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByNameResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByNameResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByNameResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByNameResponse.Brand.Industries.Eic.Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByNameResponse.Brand.Industries.Eic.Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByNameResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByNameResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByNameResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByNameResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByNameResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByNameResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByNameResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + assertThat(brandRetrieveByNameResponse.code()).contains(0L) + assertThat(brandRetrieveByNameResponse.status()).contains("status") + } + + @Test + fun roundtrip() { + val jsonMapper = jsonMapper() + val brandRetrieveByNameResponse = + BrandRetrieveByNameResponse.builder() + .brand( + BrandRetrieveByNameResponse.Brand.builder() + .address( + BrandRetrieveByNameResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByNameResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByNameResponse.Brand.Backdrop.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByNameResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByNameResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByNameResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByNameResponse.Brand.Industries.Eic + .Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByNameResponse.Brand.Industries.Eic + .Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByNameResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByNameResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByNameResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByNameResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByNameResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByNameResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByNameResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByNameResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + .code(0L) + .status("status") + .build() + + val roundtrippedBrandRetrieveByNameResponse = + jsonMapper.readValue( + jsonMapper.writeValueAsString(brandRetrieveByNameResponse), + jacksonTypeRef(), + ) + + assertThat(roundtrippedBrandRetrieveByNameResponse).isEqualTo(brandRetrieveByNameResponse) + } +} diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParamsTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParamsTest.kt new file mode 100644 index 0000000..a8abcba --- /dev/null +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerParamsTest.kt @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.http.QueryParams +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class BrandRetrieveByTickerParamsTest { + + @Test + fun create() { + BrandRetrieveByTickerParams.builder() + .ticker("ticker") + .forceLanguage(BrandRetrieveByTickerParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .tickerExchange(BrandRetrieveByTickerParams.TickerExchange.AMEX) + .timeoutMs(1L) + .build() + } + + @Test + fun queryParams() { + val params = + BrandRetrieveByTickerParams.builder() + .ticker("ticker") + .forceLanguage(BrandRetrieveByTickerParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .tickerExchange(BrandRetrieveByTickerParams.TickerExchange.AMEX) + .timeoutMs(1L) + .build() + + val queryParams = params._queryParams() + + assertThat(queryParams) + .isEqualTo( + QueryParams.builder() + .put("ticker", "ticker") + .put("force_language", "albanian") + .put("maxSpeed", "true") + .put("ticker_exchange", "AMEX") + .put("timeoutMS", "1") + .build() + ) + } + + @Test + fun queryParamsWithoutOptionalFields() { + val params = BrandRetrieveByTickerParams.builder().ticker("ticker").build() + + val queryParams = params._queryParams() + + assertThat(queryParams).isEqualTo(QueryParams.builder().put("ticker", "ticker").build()) + } +} diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponseTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponseTest.kt new file mode 100644 index 0000000..42f393b --- /dev/null +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveByTickerResponseTest.kt @@ -0,0 +1,362 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.branddev.api.models.brand + +import com.branddev.api.core.jsonMapper +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class BrandRetrieveByTickerResponseTest { + + @Test + fun create() { + val brandRetrieveByTickerResponse = + BrandRetrieveByTickerResponse.builder() + .brand( + BrandRetrieveByTickerResponse.Brand.builder() + .address( + BrandRetrieveByTickerResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByTickerResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByTickerResponse.Brand.Backdrop.Resolution + .builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByTickerResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByTickerResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByTickerResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic + .Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic + .Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByTickerResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByTickerResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByTickerResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByTickerResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByTickerResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByTickerResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByTickerResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + .code(0L) + .status("status") + .build() + + assertThat(brandRetrieveByTickerResponse.brand()) + .contains( + BrandRetrieveByTickerResponse.Brand.builder() + .address( + BrandRetrieveByTickerResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByTickerResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByTickerResponse.Brand.Backdrop.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByTickerResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByTickerResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByTickerResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic.Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic + .Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByTickerResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByTickerResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByTickerResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByTickerResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByTickerResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByTickerResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByTickerResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + assertThat(brandRetrieveByTickerResponse.code()).contains(0L) + assertThat(brandRetrieveByTickerResponse.status()).contains("status") + } + + @Test + fun roundtrip() { + val jsonMapper = jsonMapper() + val brandRetrieveByTickerResponse = + BrandRetrieveByTickerResponse.builder() + .brand( + BrandRetrieveByTickerResponse.Brand.builder() + .address( + BrandRetrieveByTickerResponse.Brand.Address.builder() + .city("city") + .country("country") + .countryCode("country_code") + .postalCode("postal_code") + .stateCode("state_code") + .stateProvince("state_province") + .street("street") + .build() + ) + .addBackdrop( + BrandRetrieveByTickerResponse.Brand.Backdrop.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Backdrop.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .resolution( + BrandRetrieveByTickerResponse.Brand.Backdrop.Resolution + .builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .url("url") + .build() + ) + .addColor( + BrandRetrieveByTickerResponse.Brand.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .description("description") + .domain("domain") + .email("email") + .industries( + BrandRetrieveByTickerResponse.Brand.Industries.builder() + .addEic( + BrandRetrieveByTickerResponse.Brand.Industries.Eic.builder() + .industry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic + .Industry + .AEROSPACE_DEFENSE + ) + .subindustry( + BrandRetrieveByTickerResponse.Brand.Industries.Eic + .Subindustry + .DEFENSE_SYSTEMS_MILITARY_HARDWARE + ) + .build() + ) + .build() + ) + .isNsfw(true) + .links( + BrandRetrieveByTickerResponse.Brand.Links.builder() + .blog("blog") + .careers("careers") + .contact("contact") + .pricing("pricing") + .privacy("privacy") + .terms("terms") + .build() + ) + .addLogo( + BrandRetrieveByTickerResponse.Brand.Logo.builder() + .addColor( + BrandRetrieveByTickerResponse.Brand.Logo.Color.builder() + .hex("hex") + .name("name") + .build() + ) + .mode(BrandRetrieveByTickerResponse.Brand.Logo.Mode.LIGHT) + .resolution( + BrandRetrieveByTickerResponse.Brand.Logo.Resolution.builder() + .aspectRatio(0.0) + .height(0L) + .width(0L) + .build() + ) + .type(BrandRetrieveByTickerResponse.Brand.Logo.Type.ICON) + .url("url") + .build() + ) + .phone("phone") + .slogan("slogan") + .addSocial( + BrandRetrieveByTickerResponse.Brand.Social.builder() + .type("type") + .url("url") + .build() + ) + .stock( + BrandRetrieveByTickerResponse.Brand.Stock.builder() + .exchange("exchange") + .ticker("ticker") + .build() + ) + .title("title") + .build() + ) + .code(0L) + .status("status") + .build() + + val roundtrippedBrandRetrieveByTickerResponse = + jsonMapper.readValue( + jsonMapper.writeValueAsString(brandRetrieveByTickerResponse), + jacksonTypeRef(), + ) + + assertThat(roundtrippedBrandRetrieveByTickerResponse) + .isEqualTo(brandRetrieveByTickerResponse) + } +} diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt index 5b10650..2d9add8 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt @@ -7,6 +7,8 @@ import com.branddev.api.client.okhttp.BrandDevOkHttpClientAsync import com.branddev.api.models.brand.BrandAiQueryParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandPrefetchParams +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByTickerParams import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveParams import com.branddev.api.models.brand.BrandRetrieveSimplifiedParams @@ -129,6 +131,55 @@ internal class BrandServiceAsyncTest { response.validate() } + @Disabled("Prism tests are disabled") + @Test + fun retrieveByName() { + val client = + BrandDevOkHttpClientAsync.builder() + .baseUrl(TestServerExtension.BASE_URL) + .apiKey("My API Key") + .build() + val brandServiceAsync = client.brand() + + val responseFuture = + brandServiceAsync.retrieveByName( + BrandRetrieveByNameParams.builder() + .name("xxx") + .forceLanguage(BrandRetrieveByNameParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .timeoutMs(1L) + .build() + ) + + val response = responseFuture.get() + response.validate() + } + + @Disabled("Prism tests are disabled") + @Test + fun retrieveByTicker() { + val client = + BrandDevOkHttpClientAsync.builder() + .baseUrl(TestServerExtension.BASE_URL) + .apiKey("My API Key") + .build() + val brandServiceAsync = client.brand() + + val responseFuture = + brandServiceAsync.retrieveByTicker( + BrandRetrieveByTickerParams.builder() + .ticker("ticker") + .forceLanguage(BrandRetrieveByTickerParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .tickerExchange(BrandRetrieveByTickerParams.TickerExchange.AMEX) + .timeoutMs(1L) + .build() + ) + + val response = responseFuture.get() + response.validate() + } + @Disabled("Prism tests are disabled") @Test fun retrieveNaics() { diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt index 2f63bd1..ab03df7 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt @@ -7,6 +7,8 @@ import com.branddev.api.client.okhttp.BrandDevOkHttpClient import com.branddev.api.models.brand.BrandAiQueryParams import com.branddev.api.models.brand.BrandIdentifyFromTransactionParams import com.branddev.api.models.brand.BrandPrefetchParams +import com.branddev.api.models.brand.BrandRetrieveByNameParams +import com.branddev.api.models.brand.BrandRetrieveByTickerParams import com.branddev.api.models.brand.BrandRetrieveNaicsParams import com.branddev.api.models.brand.BrandRetrieveParams import com.branddev.api.models.brand.BrandRetrieveSimplifiedParams @@ -125,6 +127,53 @@ internal class BrandServiceTest { response.validate() } + @Disabled("Prism tests are disabled") + @Test + fun retrieveByName() { + val client = + BrandDevOkHttpClient.builder() + .baseUrl(TestServerExtension.BASE_URL) + .apiKey("My API Key") + .build() + val brandService = client.brand() + + val response = + brandService.retrieveByName( + BrandRetrieveByNameParams.builder() + .name("xxx") + .forceLanguage(BrandRetrieveByNameParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .timeoutMs(1L) + .build() + ) + + response.validate() + } + + @Disabled("Prism tests are disabled") + @Test + fun retrieveByTicker() { + val client = + BrandDevOkHttpClient.builder() + .baseUrl(TestServerExtension.BASE_URL) + .apiKey("My API Key") + .build() + val brandService = client.brand() + + val response = + brandService.retrieveByTicker( + BrandRetrieveByTickerParams.builder() + .ticker("ticker") + .forceLanguage(BrandRetrieveByTickerParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) + .tickerExchange(BrandRetrieveByTickerParams.TickerExchange.AMEX) + .timeoutMs(1L) + .build() + ) + + response.validate() + } + @Disabled("Prism tests are disabled") @Test fun retrieveNaics() { From 9d79a00f299f1e2c9bd98a38a6db8a99fd781ebe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:52:10 +0000 Subject: [PATCH 3/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1264983..d6f900a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 10 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-b4634ce20698b51bceba24fe685badcd7e1aeb470d3562df8ad2240e1f771a83.yml -openapi_spec_hash: 505b9bfbc33f2330a2adea1a6f534e5f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-cd55f587a8aff1c17aa98d828486e82082ff408b1dc835632284a1a8f519a8e0.yml +openapi_spec_hash: 228af7a8532747ec67fc81a4e4f365aa config_hash: a1303564edd6276a63d584a02b2238b2 From 111d4ec6c0d203bbb6777e20e49ce1807aa57e35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:54:15 +0000 Subject: [PATCH 4/6] feat(api): api update --- .stats.yml | 4 +- .../api/models/brand/BrandRetrieveParams.kt | 632 +----------------- .../api/services/async/BrandServiceAsync.kt | 5 +- .../api/services/blocking/BrandService.kt | 5 +- .../models/brand/BrandRetrieveParamsTest.kt | 9 - .../api/services/ErrorHandlingTest.kt | 51 -- .../api/services/ServiceParamsTest.kt | 3 - .../services/async/BrandServiceAsyncTest.kt | 3 - .../api/services/blocking/BrandServiceTest.kt | 3 - 9 files changed, 6 insertions(+), 709 deletions(-) diff --git a/.stats.yml b/.stats.yml index d6f900a..a7470db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 10 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-cd55f587a8aff1c17aa98d828486e82082ff408b1dc835632284a1a8f519a8e0.yml -openapi_spec_hash: 228af7a8532747ec67fc81a4e4f365aa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-90a3350206f5abf24f9b8e29cbb467308ebdea82b4d7aaebd0845875810f5910.yml +openapi_spec_hash: bb5e54c40d38f82eab1d829b831b1671 config_hash: a1303564edd6276a63d584a02b2238b2 diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt index 945afd9..87655ac 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt @@ -13,18 +13,12 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** - * Retrieve brand information using one of three methods: domain name, company name, or stock ticker - * symbol. Exactly one of these parameters must be provided. - */ +/** Retrieve brand information from a domain name */ class BrandRetrieveParams private constructor( private val domain: String?, private val forceLanguage: ForceLanguage?, private val maxSpeed: Boolean?, - private val name: String?, - private val ticker: String?, - private val tickerExchange: TickerExchange?, private val timeoutMs: Long?, private val additionalHeaders: Headers, private val additionalQueryParams: QueryParams, @@ -49,24 +43,6 @@ private constructor( */ fun maxSpeed(): Optional = Optional.ofNullable(maxSpeed) - /** - * Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporation'). Must be - * 3-30 characters. Cannot be used with domain or ticker parameters. - */ - fun name(): Optional = Optional.ofNullable(name) - - /** - * Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). Must be 1-15 - * characters, letters/numbers/dots only. Cannot be used with domain or name parameters. - */ - fun ticker(): Optional = Optional.ofNullable(ticker) - - /** - * Optional stock exchange for the ticker. Only used when ticker parameter is provided. Defaults - * to assume ticker is American if not specified. - */ - fun tickerExchange(): Optional = Optional.ofNullable(tickerExchange) - /** * Optional timeout in milliseconds for the request. If the request takes longer than this * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 @@ -96,9 +72,6 @@ private constructor( private var domain: String? = null private var forceLanguage: ForceLanguage? = null private var maxSpeed: Boolean? = null - private var name: String? = null - private var ticker: String? = null - private var tickerExchange: TickerExchange? = null private var timeoutMs: Long? = null private var additionalHeaders: Headers.Builder = Headers.builder() private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() @@ -108,9 +81,6 @@ private constructor( domain = brandRetrieveParams.domain forceLanguage = brandRetrieveParams.forceLanguage maxSpeed = brandRetrieveParams.maxSpeed - name = brandRetrieveParams.name - ticker = brandRetrieveParams.ticker - tickerExchange = brandRetrieveParams.tickerExchange timeoutMs = brandRetrieveParams.timeoutMs additionalHeaders = brandRetrieveParams.additionalHeaders.toBuilder() additionalQueryParams = brandRetrieveParams.additionalQueryParams.toBuilder() @@ -154,37 +124,6 @@ private constructor( /** Alias for calling [Builder.maxSpeed] with `maxSpeed.orElse(null)`. */ fun maxSpeed(maxSpeed: Optional) = maxSpeed(maxSpeed.getOrNull()) - /** - * Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporation'). - * Must be 3-30 characters. Cannot be used with domain or ticker parameters. - */ - fun name(name: String?) = apply { this.name = name } - - /** Alias for calling [Builder.name] with `name.orElse(null)`. */ - fun name(name: Optional) = name(name.getOrNull()) - - /** - * Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). Must be - * 1-15 characters, letters/numbers/dots only. Cannot be used with domain or name - * parameters. - */ - fun ticker(ticker: String?) = apply { this.ticker = ticker } - - /** Alias for calling [Builder.ticker] with `ticker.orElse(null)`. */ - fun ticker(ticker: Optional) = ticker(ticker.getOrNull()) - - /** - * Optional stock exchange for the ticker. Only used when ticker parameter is provided. - * Defaults to assume ticker is American if not specified. - */ - fun tickerExchange(tickerExchange: TickerExchange?) = apply { - this.tickerExchange = tickerExchange - } - - /** Alias for calling [Builder.tickerExchange] with `tickerExchange.orElse(null)`. */ - fun tickerExchange(tickerExchange: Optional) = - tickerExchange(tickerExchange.getOrNull()) - /** * Optional timeout in milliseconds for the request. If the request takes longer than this * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 @@ -310,9 +249,6 @@ private constructor( domain, forceLanguage, maxSpeed, - name, - ticker, - tickerExchange, timeoutMs, additionalHeaders.build(), additionalQueryParams.build(), @@ -327,9 +263,6 @@ private constructor( domain?.let { put("domain", it) } forceLanguage?.let { put("force_language", it.toString()) } maxSpeed?.let { put("maxSpeed", it.toString()) } - name?.let { put("name", it) } - ticker?.let { put("ticker", it) } - tickerExchange?.let { put("ticker_exchange", it.toString()) } timeoutMs?.let { put("timeoutMS", it.toString()) } putAll(additionalQueryParams) } @@ -770,561 +703,6 @@ private constructor( override fun toString() = value.toString() } - /** - * Optional stock exchange for the ticker. Only used when ticker parameter is provided. Defaults - * to assume ticker is American if not specified. - */ - class TickerExchange @JsonCreator private constructor(private val value: JsonField) : - Enum { - - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - - companion object { - - @JvmField val AMEX = of("AMEX") - - @JvmField val AMS = of("AMS") - - @JvmField val AQS = of("AQS") - - @JvmField val ASX = of("ASX") - - @JvmField val ATH = of("ATH") - - @JvmField val BER = of("BER") - - @JvmField val BME = of("BME") - - @JvmField val BRU = of("BRU") - - @JvmField val BSE = of("BSE") - - @JvmField val BUD = of("BUD") - - @JvmField val BUE = of("BUE") - - @JvmField val BVC = of("BVC") - - @JvmField val CBOE = of("CBOE") - - @JvmField val CNQ = of("CNQ") - - @JvmField val CPH = of("CPH") - - @JvmField val DFM = of("DFM") - - @JvmField val DOH = of("DOH") - - @JvmField val DUB = of("DUB") - - @JvmField val DUS = of("DUS") - - @JvmField val DXE = of("DXE") - - @JvmField val EGX = of("EGX") - - @JvmField val FSX = of("FSX") - - @JvmField val HAM = of("HAM") - - @JvmField val HEL = of("HEL") - - @JvmField val HKSE = of("HKSE") - - @JvmField val HOSE = of("HOSE") - - @JvmField val ICE = of("ICE") - - @JvmField val IOB = of("IOB") - - @JvmField val IST = of("IST") - - @JvmField val JKT = of("JKT") - - @JvmField val JNB = of("JNB") - - @JvmField val JPX = of("JPX") - - @JvmField val KLS = of("KLS") - - @JvmField val KOE = of("KOE") - - @JvmField val KSC = of("KSC") - - @JvmField val KUW = of("KUW") - - @JvmField val LIS = of("LIS") - - @JvmField val LSE = of("LSE") - - @JvmField val MCX = of("MCX") - - @JvmField val MEX = of("MEX") - - @JvmField val MIL = of("MIL") - - @JvmField val MUN = of("MUN") - - @JvmField val NASDAQ = of("NASDAQ") - - @JvmField val NEO = of("NEO") - - @JvmField val NSE = of("NSE") - - @JvmField val NYSE = of("NYSE") - - @JvmField val NZE = of("NZE") - - @JvmField val OSL = of("OSL") - - @JvmField val OTC = of("OTC") - - @JvmField val PAR = of("PAR") - - @JvmField val PNK = of("PNK") - - @JvmField val PRA = of("PRA") - - @JvmField val RIS = of("RIS") - - @JvmField val SAO = of("SAO") - - @JvmField val SAU = of("SAU") - - @JvmField val SES = of("SES") - - @JvmField val SET = of("SET") - - @JvmField val SGO = of("SGO") - - @JvmField val SHH = of("SHH") - - @JvmField val SHZ = of("SHZ") - - @JvmField val SIX = of("SIX") - - @JvmField val STO = of("STO") - - @JvmField val STU = of("STU") - - @JvmField val TAI = of("TAI") - - @JvmField val TAL = of("TAL") - - @JvmField val TLV = of("TLV") - - @JvmField val TSX = of("TSX") - - @JvmField val TSXV = of("TSXV") - - @JvmField val TWO = of("TWO") - - @JvmField val VIE = of("VIE") - - @JvmField val WSE = of("WSE") - - @JvmField val XETRA = of("XETRA") - - @JvmStatic fun of(value: String) = TickerExchange(JsonField.of(value)) - } - - /** An enum containing [TickerExchange]'s known values. */ - enum class Known { - AMEX, - AMS, - AQS, - ASX, - ATH, - BER, - BME, - BRU, - BSE, - BUD, - BUE, - BVC, - CBOE, - CNQ, - CPH, - DFM, - DOH, - DUB, - DUS, - DXE, - EGX, - FSX, - HAM, - HEL, - HKSE, - HOSE, - ICE, - IOB, - IST, - JKT, - JNB, - JPX, - KLS, - KOE, - KSC, - KUW, - LIS, - LSE, - MCX, - MEX, - MIL, - MUN, - NASDAQ, - NEO, - NSE, - NYSE, - NZE, - OSL, - OTC, - PAR, - PNK, - PRA, - RIS, - SAO, - SAU, - SES, - SET, - SGO, - SHH, - SHZ, - SIX, - STO, - STU, - TAI, - TAL, - TLV, - TSX, - TSXV, - TWO, - VIE, - WSE, - XETRA, - } - - /** - * An enum containing [TickerExchange]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [TickerExchange] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - AMEX, - AMS, - AQS, - ASX, - ATH, - BER, - BME, - BRU, - BSE, - BUD, - BUE, - BVC, - CBOE, - CNQ, - CPH, - DFM, - DOH, - DUB, - DUS, - DXE, - EGX, - FSX, - HAM, - HEL, - HKSE, - HOSE, - ICE, - IOB, - IST, - JKT, - JNB, - JPX, - KLS, - KOE, - KSC, - KUW, - LIS, - LSE, - MCX, - MEX, - MIL, - MUN, - NASDAQ, - NEO, - NSE, - NYSE, - NZE, - OSL, - OTC, - PAR, - PNK, - PRA, - RIS, - SAO, - SAU, - SES, - SET, - SGO, - SHH, - SHZ, - SIX, - STO, - STU, - TAI, - TAL, - TLV, - TSX, - TSXV, - TWO, - VIE, - WSE, - XETRA, - /** - * An enum member indicating that [TickerExchange] was instantiated with an unknown - * value. - */ - _UNKNOWN, - } - - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. - */ - fun value(): Value = - when (this) { - AMEX -> Value.AMEX - AMS -> Value.AMS - AQS -> Value.AQS - ASX -> Value.ASX - ATH -> Value.ATH - BER -> Value.BER - BME -> Value.BME - BRU -> Value.BRU - BSE -> Value.BSE - BUD -> Value.BUD - BUE -> Value.BUE - BVC -> Value.BVC - CBOE -> Value.CBOE - CNQ -> Value.CNQ - CPH -> Value.CPH - DFM -> Value.DFM - DOH -> Value.DOH - DUB -> Value.DUB - DUS -> Value.DUS - DXE -> Value.DXE - EGX -> Value.EGX - FSX -> Value.FSX - HAM -> Value.HAM - HEL -> Value.HEL - HKSE -> Value.HKSE - HOSE -> Value.HOSE - ICE -> Value.ICE - IOB -> Value.IOB - IST -> Value.IST - JKT -> Value.JKT - JNB -> Value.JNB - JPX -> Value.JPX - KLS -> Value.KLS - KOE -> Value.KOE - KSC -> Value.KSC - KUW -> Value.KUW - LIS -> Value.LIS - LSE -> Value.LSE - MCX -> Value.MCX - MEX -> Value.MEX - MIL -> Value.MIL - MUN -> Value.MUN - NASDAQ -> Value.NASDAQ - NEO -> Value.NEO - NSE -> Value.NSE - NYSE -> Value.NYSE - NZE -> Value.NZE - OSL -> Value.OSL - OTC -> Value.OTC - PAR -> Value.PAR - PNK -> Value.PNK - PRA -> Value.PRA - RIS -> Value.RIS - SAO -> Value.SAO - SAU -> Value.SAU - SES -> Value.SES - SET -> Value.SET - SGO -> Value.SGO - SHH -> Value.SHH - SHZ -> Value.SHZ - SIX -> Value.SIX - STO -> Value.STO - STU -> Value.STU - TAI -> Value.TAI - TAL -> Value.TAL - TLV -> Value.TLV - TSX -> Value.TSX - TSXV -> Value.TSXV - TWO -> Value.TWO - VIE -> Value.VIE - WSE -> Value.WSE - XETRA -> Value.XETRA - else -> Value._UNKNOWN - } - - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. - * - * @throws BrandDevInvalidDataException if this class instance's value is a not a known - * member. - */ - fun known(): Known = - when (this) { - AMEX -> Known.AMEX - AMS -> Known.AMS - AQS -> Known.AQS - ASX -> Known.ASX - ATH -> Known.ATH - BER -> Known.BER - BME -> Known.BME - BRU -> Known.BRU - BSE -> Known.BSE - BUD -> Known.BUD - BUE -> Known.BUE - BVC -> Known.BVC - CBOE -> Known.CBOE - CNQ -> Known.CNQ - CPH -> Known.CPH - DFM -> Known.DFM - DOH -> Known.DOH - DUB -> Known.DUB - DUS -> Known.DUS - DXE -> Known.DXE - EGX -> Known.EGX - FSX -> Known.FSX - HAM -> Known.HAM - HEL -> Known.HEL - HKSE -> Known.HKSE - HOSE -> Known.HOSE - ICE -> Known.ICE - IOB -> Known.IOB - IST -> Known.IST - JKT -> Known.JKT - JNB -> Known.JNB - JPX -> Known.JPX - KLS -> Known.KLS - KOE -> Known.KOE - KSC -> Known.KSC - KUW -> Known.KUW - LIS -> Known.LIS - LSE -> Known.LSE - MCX -> Known.MCX - MEX -> Known.MEX - MIL -> Known.MIL - MUN -> Known.MUN - NASDAQ -> Known.NASDAQ - NEO -> Known.NEO - NSE -> Known.NSE - NYSE -> Known.NYSE - NZE -> Known.NZE - OSL -> Known.OSL - OTC -> Known.OTC - PAR -> Known.PAR - PNK -> Known.PNK - PRA -> Known.PRA - RIS -> Known.RIS - SAO -> Known.SAO - SAU -> Known.SAU - SES -> Known.SES - SET -> Known.SET - SGO -> Known.SGO - SHH -> Known.SHH - SHZ -> Known.SHZ - SIX -> Known.SIX - STO -> Known.STO - STU -> Known.STU - TAI -> Known.TAI - TAL -> Known.TAL - TLV -> Known.TLV - TSX -> Known.TSX - TSXV -> Known.TSXV - TWO -> Known.TWO - VIE -> Known.VIE - WSE -> Known.WSE - XETRA -> Known.XETRA - else -> throw BrandDevInvalidDataException("Unknown TickerExchange: $value") - } - - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. - * - * @throws BrandDevInvalidDataException if this class instance's value does not have the - * expected primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { - BrandDevInvalidDataException("Value is not a String") - } - - private var validated: Boolean = false - - fun validate(): TickerExchange = apply { - if (validated) { - return@apply - } - - known() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: BrandDevInvalidDataException) { - false - } - - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is TickerExchange && value == other.value - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - } - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -1334,9 +712,6 @@ private constructor( domain == other.domain && forceLanguage == other.forceLanguage && maxSpeed == other.maxSpeed && - name == other.name && - ticker == other.ticker && - tickerExchange == other.tickerExchange && timeoutMs == other.timeoutMs && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams @@ -1347,14 +722,11 @@ private constructor( domain, forceLanguage, maxSpeed, - name, - ticker, - tickerExchange, timeoutMs, additionalHeaders, additionalQueryParams, ) override fun toString() = - "BrandRetrieveParams{domain=$domain, forceLanguage=$forceLanguage, maxSpeed=$maxSpeed, name=$name, ticker=$ticker, tickerExchange=$tickerExchange, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + "BrandRetrieveParams{domain=$domain, forceLanguage=$forceLanguage, maxSpeed=$maxSpeed, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt index cbafb4a..afc8816 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt @@ -42,10 +42,7 @@ interface BrandServiceAsync { */ fun withOptions(modifier: Consumer): BrandServiceAsync - /** - * Retrieve brand information using one of three methods: domain name, company name, or stock - * ticker symbol. Exactly one of these parameters must be provided. - */ + /** Retrieve brand information from a domain name */ fun retrieve(): CompletableFuture = retrieve(BrandRetrieveParams.none()) /** @see retrieve */ diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt index dfc5f6a..77aeb14 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt @@ -42,10 +42,7 @@ interface BrandService { */ fun withOptions(modifier: Consumer): BrandService - /** - * Retrieve brand information using one of three methods: domain name, company name, or stock - * ticker symbol. Exactly one of these parameters must be provided. - */ + /** Retrieve brand information from a domain name */ fun retrieve(): BrandRetrieveResponse = retrieve(BrandRetrieveParams.none()) /** @see retrieve */ diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveParamsTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveParamsTest.kt index c7c5a94..794e470 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveParamsTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandRetrieveParamsTest.kt @@ -14,9 +14,6 @@ internal class BrandRetrieveParamsTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() } @@ -28,9 +25,6 @@ internal class BrandRetrieveParamsTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() @@ -42,9 +36,6 @@ internal class BrandRetrieveParamsTest { .put("domain", "domain") .put("force_language", "albanian") .put("maxSpeed", "true") - .put("name", "xxx") - .put("ticker", "ticker") - .put("ticker_exchange", "AMEX") .put("timeoutMS", "1") .build() ) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ErrorHandlingTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ErrorHandlingTest.kt index f8f0a2c..5b14671 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ErrorHandlingTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ErrorHandlingTest.kt @@ -75,9 +75,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -105,9 +102,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -135,9 +129,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -165,9 +156,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -195,9 +183,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -225,9 +210,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -255,9 +237,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -285,9 +264,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -315,9 +291,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -345,9 +318,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -375,9 +345,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -405,9 +372,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -435,9 +399,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -465,9 +426,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -495,9 +453,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -525,9 +480,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) @@ -553,9 +505,6 @@ internal class ErrorHandlingTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ServiceParamsTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ServiceParamsTest.kt index 9581aa2..4788b35 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ServiceParamsTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/ServiceParamsTest.kt @@ -45,9 +45,6 @@ internal class ServiceParamsTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .putAdditionalHeader("Secret-Header", "42") .putAdditionalQueryParam("secret_query_param", "42") diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt index 2d9add8..881b486 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt @@ -37,9 +37,6 @@ internal class BrandServiceAsyncTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt index ab03df7..6c03995 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt @@ -37,9 +37,6 @@ internal class BrandServiceTest { .domain("domain") .forceLanguage(BrandRetrieveParams.ForceLanguage.ALBANIAN) .maxSpeed(true) - .name("xxx") - .ticker("ticker") - .tickerExchange(BrandRetrieveParams.TickerExchange.AMEX) .timeoutMs(1L) .build() ) From 39b793ccb7521dad3120a2e5bfef71492cf984a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 00:05:46 +0000 Subject: [PATCH 5/6] feat(api): api update --- .stats.yml | 4 +- .../BrandIdentifyFromTransactionParams.kt | 494 +++++++++++++++++- .../api/models/brand/BrandRetrieveParams.kt | 2 +- .../api/services/async/BrandServiceAsync.kt | 2 +- .../api/services/blocking/BrandService.kt | 2 +- .../BrandIdentifyFromTransactionParamsTest.kt | 6 + .../services/async/BrandServiceAsyncTest.kt | 2 + .../api/services/blocking/BrandServiceTest.kt | 2 + 8 files changed, 507 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index a7470db..b6baa96 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 10 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-90a3350206f5abf24f9b8e29cbb467308ebdea82b4d7aaebd0845875810f5910.yml -openapi_spec_hash: bb5e54c40d38f82eab1d829b831b1671 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a634e2867f22f7485bf8ef51d18a25c010274dcbd60a420c8b35e68d017c8c95.yml +openapi_spec_hash: 8990e4b274d4563c77525b15a2723f63 config_hash: a1303564edd6276a63d584a02b2238b2 diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParams.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParams.kt index 819ebe4..e903ba7 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParams.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParams.kt @@ -2,10 +2,14 @@ package com.branddev.api.models.brand +import com.branddev.api.core.Enum +import com.branddev.api.core.JsonField import com.branddev.api.core.Params import com.branddev.api.core.checkRequired import com.branddev.api.core.http.Headers import com.branddev.api.core.http.QueryParams +import com.branddev.api.errors.BrandDevInvalidDataException +import com.fasterxml.jackson.annotation.JsonCreator import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull @@ -17,6 +21,8 @@ import kotlin.jvm.optionals.getOrNull class BrandIdentifyFromTransactionParams private constructor( private val transactionInfo: String, + private val forceLanguage: ForceLanguage?, + private val maxSpeed: Boolean?, private val timeoutMs: Long?, private val additionalHeaders: Headers, private val additionalQueryParams: QueryParams, @@ -25,6 +31,15 @@ private constructor( /** Transaction information to identify the brand */ fun transactionInfo(): String = transactionInfo + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(): Optional = Optional.ofNullable(forceLanguage) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API will + * skip time-consuming operations for faster response at the cost of less comprehensive data. + */ + fun maxSpeed(): Optional = Optional.ofNullable(maxSpeed) + /** * Optional timeout in milliseconds for the request. If the request takes longer than this * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 @@ -58,6 +73,8 @@ private constructor( class Builder internal constructor() { private var transactionInfo: String? = null + private var forceLanguage: ForceLanguage? = null + private var maxSpeed: Boolean? = null private var timeoutMs: Long? = null private var additionalHeaders: Headers.Builder = Headers.builder() private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() @@ -66,6 +83,8 @@ private constructor( internal fun from(brandIdentifyFromTransactionParams: BrandIdentifyFromTransactionParams) = apply { transactionInfo = brandIdentifyFromTransactionParams.transactionInfo + forceLanguage = brandIdentifyFromTransactionParams.forceLanguage + maxSpeed = brandIdentifyFromTransactionParams.maxSpeed timeoutMs = brandIdentifyFromTransactionParams.timeoutMs additionalHeaders = brandIdentifyFromTransactionParams.additionalHeaders.toBuilder() additionalQueryParams = @@ -77,6 +96,32 @@ private constructor( this.transactionInfo = transactionInfo } + /** Optional parameter to force the language of the retrieved brand data. */ + fun forceLanguage(forceLanguage: ForceLanguage?) = apply { + this.forceLanguage = forceLanguage + } + + /** Alias for calling [Builder.forceLanguage] with `forceLanguage.orElse(null)`. */ + fun forceLanguage(forceLanguage: Optional) = + forceLanguage(forceLanguage.getOrNull()) + + /** + * Optional parameter to optimize the API call for maximum speed. When set to true, the API + * will skip time-consuming operations for faster response at the cost of less comprehensive + * data. + */ + fun maxSpeed(maxSpeed: Boolean?) = apply { this.maxSpeed = maxSpeed } + + /** + * Alias for [Builder.maxSpeed]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun maxSpeed(maxSpeed: Boolean) = maxSpeed(maxSpeed as Boolean?) + + /** Alias for calling [Builder.maxSpeed] with `maxSpeed.orElse(null)`. */ + fun maxSpeed(maxSpeed: Optional) = maxSpeed(maxSpeed.getOrNull()) + /** * Optional timeout in milliseconds for the request. If the request takes longer than this * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 @@ -207,6 +252,8 @@ private constructor( fun build(): BrandIdentifyFromTransactionParams = BrandIdentifyFromTransactionParams( checkRequired("transactionInfo", transactionInfo), + forceLanguage, + maxSpeed, timeoutMs, additionalHeaders.build(), additionalQueryParams.build(), @@ -219,11 +266,445 @@ private constructor( QueryParams.builder() .apply { put("transaction_info", transactionInfo) + forceLanguage?.let { put("force_language", it.toString()) } + maxSpeed?.let { put("maxSpeed", it.toString()) } timeoutMs?.let { put("timeoutMS", it.toString()) } putAll(additionalQueryParams) } .build() + /** Optional parameter to force the language of the retrieved brand data. */ + class ForceLanguage @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ALBANIAN = of("albanian") + + @JvmField val ARABIC = of("arabic") + + @JvmField val AZERI = of("azeri") + + @JvmField val BENGALI = of("bengali") + + @JvmField val BULGARIAN = of("bulgarian") + + @JvmField val CEBUANO = of("cebuano") + + @JvmField val CROATIAN = of("croatian") + + @JvmField val CZECH = of("czech") + + @JvmField val DANISH = of("danish") + + @JvmField val DUTCH = of("dutch") + + @JvmField val ENGLISH = of("english") + + @JvmField val ESTONIAN = of("estonian") + + @JvmField val FARSI = of("farsi") + + @JvmField val FINNISH = of("finnish") + + @JvmField val FRENCH = of("french") + + @JvmField val GERMAN = of("german") + + @JvmField val HAUSA = of("hausa") + + @JvmField val HAWAIIAN = of("hawaiian") + + @JvmField val HINDI = of("hindi") + + @JvmField val HUNGARIAN = of("hungarian") + + @JvmField val ICELANDIC = of("icelandic") + + @JvmField val INDONESIAN = of("indonesian") + + @JvmField val ITALIAN = of("italian") + + @JvmField val KAZAKH = of("kazakh") + + @JvmField val KYRGYZ = of("kyrgyz") + + @JvmField val LATIN = of("latin") + + @JvmField val LATVIAN = of("latvian") + + @JvmField val LITHUANIAN = of("lithuanian") + + @JvmField val MACEDONIAN = of("macedonian") + + @JvmField val MONGOLIAN = of("mongolian") + + @JvmField val NEPALI = of("nepali") + + @JvmField val NORWEGIAN = of("norwegian") + + @JvmField val PASHTO = of("pashto") + + @JvmField val PIDGIN = of("pidgin") + + @JvmField val POLISH = of("polish") + + @JvmField val PORTUGUESE = of("portuguese") + + @JvmField val ROMANIAN = of("romanian") + + @JvmField val RUSSIAN = of("russian") + + @JvmField val SERBIAN = of("serbian") + + @JvmField val SLOVAK = of("slovak") + + @JvmField val SLOVENE = of("slovene") + + @JvmField val SOMALI = of("somali") + + @JvmField val SPANISH = of("spanish") + + @JvmField val SWAHILI = of("swahili") + + @JvmField val SWEDISH = of("swedish") + + @JvmField val TAGALOG = of("tagalog") + + @JvmField val TURKISH = of("turkish") + + @JvmField val UKRAINIAN = of("ukrainian") + + @JvmField val URDU = of("urdu") + + @JvmField val UZBEK = of("uzbek") + + @JvmField val VIETNAMESE = of("vietnamese") + + @JvmField val WELSH = of("welsh") + + @JvmStatic fun of(value: String) = ForceLanguage(JsonField.of(value)) + } + + /** An enum containing [ForceLanguage]'s known values. */ + enum class Known { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + } + + /** + * An enum containing [ForceLanguage]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [ForceLanguage] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ALBANIAN, + ARABIC, + AZERI, + BENGALI, + BULGARIAN, + CEBUANO, + CROATIAN, + CZECH, + DANISH, + DUTCH, + ENGLISH, + ESTONIAN, + FARSI, + FINNISH, + FRENCH, + GERMAN, + HAUSA, + HAWAIIAN, + HINDI, + HUNGARIAN, + ICELANDIC, + INDONESIAN, + ITALIAN, + KAZAKH, + KYRGYZ, + LATIN, + LATVIAN, + LITHUANIAN, + MACEDONIAN, + MONGOLIAN, + NEPALI, + NORWEGIAN, + PASHTO, + PIDGIN, + POLISH, + PORTUGUESE, + ROMANIAN, + RUSSIAN, + SERBIAN, + SLOVAK, + SLOVENE, + SOMALI, + SPANISH, + SWAHILI, + SWEDISH, + TAGALOG, + TURKISH, + UKRAINIAN, + URDU, + UZBEK, + VIETNAMESE, + WELSH, + /** + * An enum member indicating that [ForceLanguage] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ALBANIAN -> Value.ALBANIAN + ARABIC -> Value.ARABIC + AZERI -> Value.AZERI + BENGALI -> Value.BENGALI + BULGARIAN -> Value.BULGARIAN + CEBUANO -> Value.CEBUANO + CROATIAN -> Value.CROATIAN + CZECH -> Value.CZECH + DANISH -> Value.DANISH + DUTCH -> Value.DUTCH + ENGLISH -> Value.ENGLISH + ESTONIAN -> Value.ESTONIAN + FARSI -> Value.FARSI + FINNISH -> Value.FINNISH + FRENCH -> Value.FRENCH + GERMAN -> Value.GERMAN + HAUSA -> Value.HAUSA + HAWAIIAN -> Value.HAWAIIAN + HINDI -> Value.HINDI + HUNGARIAN -> Value.HUNGARIAN + ICELANDIC -> Value.ICELANDIC + INDONESIAN -> Value.INDONESIAN + ITALIAN -> Value.ITALIAN + KAZAKH -> Value.KAZAKH + KYRGYZ -> Value.KYRGYZ + LATIN -> Value.LATIN + LATVIAN -> Value.LATVIAN + LITHUANIAN -> Value.LITHUANIAN + MACEDONIAN -> Value.MACEDONIAN + MONGOLIAN -> Value.MONGOLIAN + NEPALI -> Value.NEPALI + NORWEGIAN -> Value.NORWEGIAN + PASHTO -> Value.PASHTO + PIDGIN -> Value.PIDGIN + POLISH -> Value.POLISH + PORTUGUESE -> Value.PORTUGUESE + ROMANIAN -> Value.ROMANIAN + RUSSIAN -> Value.RUSSIAN + SERBIAN -> Value.SERBIAN + SLOVAK -> Value.SLOVAK + SLOVENE -> Value.SLOVENE + SOMALI -> Value.SOMALI + SPANISH -> Value.SPANISH + SWAHILI -> Value.SWAHILI + SWEDISH -> Value.SWEDISH + TAGALOG -> Value.TAGALOG + TURKISH -> Value.TURKISH + UKRAINIAN -> Value.UKRAINIAN + URDU -> Value.URDU + UZBEK -> Value.UZBEK + VIETNAMESE -> Value.VIETNAMESE + WELSH -> Value.WELSH + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws BrandDevInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + ALBANIAN -> Known.ALBANIAN + ARABIC -> Known.ARABIC + AZERI -> Known.AZERI + BENGALI -> Known.BENGALI + BULGARIAN -> Known.BULGARIAN + CEBUANO -> Known.CEBUANO + CROATIAN -> Known.CROATIAN + CZECH -> Known.CZECH + DANISH -> Known.DANISH + DUTCH -> Known.DUTCH + ENGLISH -> Known.ENGLISH + ESTONIAN -> Known.ESTONIAN + FARSI -> Known.FARSI + FINNISH -> Known.FINNISH + FRENCH -> Known.FRENCH + GERMAN -> Known.GERMAN + HAUSA -> Known.HAUSA + HAWAIIAN -> Known.HAWAIIAN + HINDI -> Known.HINDI + HUNGARIAN -> Known.HUNGARIAN + ICELANDIC -> Known.ICELANDIC + INDONESIAN -> Known.INDONESIAN + ITALIAN -> Known.ITALIAN + KAZAKH -> Known.KAZAKH + KYRGYZ -> Known.KYRGYZ + LATIN -> Known.LATIN + LATVIAN -> Known.LATVIAN + LITHUANIAN -> Known.LITHUANIAN + MACEDONIAN -> Known.MACEDONIAN + MONGOLIAN -> Known.MONGOLIAN + NEPALI -> Known.NEPALI + NORWEGIAN -> Known.NORWEGIAN + PASHTO -> Known.PASHTO + PIDGIN -> Known.PIDGIN + POLISH -> Known.POLISH + PORTUGUESE -> Known.PORTUGUESE + ROMANIAN -> Known.ROMANIAN + RUSSIAN -> Known.RUSSIAN + SERBIAN -> Known.SERBIAN + SLOVAK -> Known.SLOVAK + SLOVENE -> Known.SLOVENE + SOMALI -> Known.SOMALI + SPANISH -> Known.SPANISH + SWAHILI -> Known.SWAHILI + SWEDISH -> Known.SWEDISH + TAGALOG -> Known.TAGALOG + TURKISH -> Known.TURKISH + UKRAINIAN -> Known.UKRAINIAN + URDU -> Known.URDU + UZBEK -> Known.UZBEK + VIETNAMESE -> Known.VIETNAMESE + WELSH -> Known.WELSH + else -> throw BrandDevInvalidDataException("Unknown ForceLanguage: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws BrandDevInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + BrandDevInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): ForceLanguage = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: BrandDevInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is ForceLanguage && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -231,14 +712,23 @@ private constructor( return other is BrandIdentifyFromTransactionParams && transactionInfo == other.transactionInfo && + forceLanguage == other.forceLanguage && + maxSpeed == other.maxSpeed && timeoutMs == other.timeoutMs && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams } override fun hashCode(): Int = - Objects.hash(transactionInfo, timeoutMs, additionalHeaders, additionalQueryParams) + Objects.hash( + transactionInfo, + forceLanguage, + maxSpeed, + timeoutMs, + additionalHeaders, + additionalQueryParams, + ) override fun toString() = - "BrandIdentifyFromTransactionParams{transactionInfo=$transactionInfo, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + "BrandIdentifyFromTransactionParams{transactionInfo=$transactionInfo, forceLanguage=$forceLanguage, maxSpeed=$maxSpeed, timeoutMs=$timeoutMs, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt index 87655ac..372177d 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveParams.kt @@ -13,7 +13,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Retrieve brand information from a domain name */ +/** Retrieve logos, backdrops, colors, industry, description, and more from any domain */ class BrandRetrieveParams private constructor( private val domain: String?, diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt index afc8816..27f2390 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/async/BrandServiceAsync.kt @@ -42,7 +42,7 @@ interface BrandServiceAsync { */ fun withOptions(modifier: Consumer): BrandServiceAsync - /** Retrieve brand information from a domain name */ + /** Retrieve logos, backdrops, colors, industry, description, and more from any domain */ fun retrieve(): CompletableFuture = retrieve(BrandRetrieveParams.none()) /** @see retrieve */ diff --git a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt index 77aeb14..b6f9e14 100644 --- a/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt +++ b/brand-dev-java-core/src/main/kotlin/com/branddev/api/services/blocking/BrandService.kt @@ -42,7 +42,7 @@ interface BrandService { */ fun withOptions(modifier: Consumer): BrandService - /** Retrieve brand information from a domain name */ + /** Retrieve logos, backdrops, colors, industry, description, and more from any domain */ fun retrieve(): BrandRetrieveResponse = retrieve(BrandRetrieveParams.none()) /** @see retrieve */ diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParamsTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParamsTest.kt index e23f6fe..403d5eb 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParamsTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionParamsTest.kt @@ -12,6 +12,8 @@ internal class BrandIdentifyFromTransactionParamsTest { fun create() { BrandIdentifyFromTransactionParams.builder() .transactionInfo("transaction_info") + .forceLanguage(BrandIdentifyFromTransactionParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) .timeoutMs(1L) .build() } @@ -21,6 +23,8 @@ internal class BrandIdentifyFromTransactionParamsTest { val params = BrandIdentifyFromTransactionParams.builder() .transactionInfo("transaction_info") + .forceLanguage(BrandIdentifyFromTransactionParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) .timeoutMs(1L) .build() @@ -30,6 +34,8 @@ internal class BrandIdentifyFromTransactionParamsTest { .isEqualTo( QueryParams.builder() .put("transaction_info", "transaction_info") + .put("force_language", "albanian") + .put("maxSpeed", "true") .put("timeoutMS", "1") .build() ) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt index 881b486..7a8f980 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt @@ -101,6 +101,8 @@ internal class BrandServiceAsyncTest { brandServiceAsync.identifyFromTransaction( BrandIdentifyFromTransactionParams.builder() .transactionInfo("transaction_info") + .forceLanguage(BrandIdentifyFromTransactionParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) .timeoutMs(1L) .build() ) diff --git a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt index 6c03995..15e13e5 100644 --- a/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt +++ b/brand-dev-java-core/src/test/kotlin/com/branddev/api/services/blocking/BrandServiceTest.kt @@ -99,6 +99,8 @@ internal class BrandServiceTest { brandService.identifyFromTransaction( BrandIdentifyFromTransactionParams.builder() .transactionInfo("transaction_info") + .forceLanguage(BrandIdentifyFromTransactionParams.ForceLanguage.ALBANIAN) + .maxSpeed(true) .timeoutMs(1L) .build() ) From e76c4952d0f1e9989ca9621024bd7b3aea5bcb9d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 00:06:00 +0000 Subject: [PATCH 6/6] release: 0.1.0-alpha.17 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7e56fe2..e2f2c07 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.16" + ".": "0.1.0-alpha.17" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b030d4..eb12a00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.1.0-alpha.17 (2025-10-30) + +Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/brand-dot-dev/java-sdk/compare/v0.1.0-alpha.16...v0.1.0-alpha.17) + +### Features + +* **api:** api update ([39b793c](https://github.com/brand-dot-dev/java-sdk/commit/39b793ccb7521dad3120a2e5bfef71492cf984a0)) +* **api:** api update ([111d4ec](https://github.com/brand-dot-dev/java-sdk/commit/111d4ec6c0d203bbb6777e20e49ce1807aa57e35)) +* **api:** manual updates ([cabff0c](https://github.com/brand-dot-dev/java-sdk/commit/cabff0c6d0df85a304f196860d7dd55ebcc6a796)) + ## 0.1.0-alpha.16 (2025-10-08) Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/brand-dot-dev/java-sdk/compare/v0.1.0-alpha.15...v0.1.0-alpha.16) diff --git a/README.md b/README.md index da63346..15ba8aa 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.branddev.api/brand-dev-java)](https://central.sonatype.com/artifact/com.branddev.api/brand-dev-java/0.1.0-alpha.16) -[![javadoc](https://javadoc.io/badge2/com.branddev.api/brand-dev-java/0.1.0-alpha.16/javadoc.svg)](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.16) +[![Maven Central](https://img.shields.io/maven-central/v/com.branddev.api/brand-dev-java)](https://central.sonatype.com/artifact/com.branddev.api/brand-dev-java/0.1.0-alpha.17) +[![javadoc](https://javadoc.io/badge2/com.branddev.api/brand-dev-java/0.1.0-alpha.17/javadoc.svg)](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.17) @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [docs.brand.dev](https://docs.brand.dev/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.16). +The REST API documentation can be found on [docs.brand.dev](https://docs.brand.dev/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.17). @@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.brand.dev](https://docs.brand.d ### Gradle ```kotlin -implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.16") +implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.17") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.16") com.branddev.api brand-dev-java - 0.1.0-alpha.16 + 0.1.0-alpha.17 ``` diff --git a/build.gradle.kts b/build.gradle.kts index f0ea3ed..5887573 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ repositories { allprojects { group = "com.branddev.api" - version = "0.1.0-alpha.16" // x-release-please-version + version = "0.1.0-alpha.17" // x-release-please-version } subprojects {