Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.9.1"
".": "4.9.2"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml
openapi_spec_hash: 02a545d217b13399f311e99561f9de1d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-b3852cdd1020811766572923d26a6c95f4a538bf4c7268462b6ba39f34480b3e.yml
openapi_spec_hash: b2e2f2357342e9a6b16a591d0b946e38
config_hash: 0789c3cddc625bb9712b3bded274ab6c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.9.2 (2026-02-12)

Full Changelog: [v4.9.1...v4.9.2](https://github.com/trycourier/courier-java/compare/v4.9.1...v4.9.2)

### Bug Fixes

* **types:** remove brand field from ElementalContent model ([d83efc4](https://github.com/trycourier/courier-java/commit/d83efc457327b2747602f8e028afbe0d24eb1d7d))

## 4.9.1 (2026-02-07)

Full Changelog: [v4.9.0...v4.9.1](https://github.com/trycourier/courier-java/compare/v4.9.0...v4.9.1)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.9.1)
[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.9.1/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.9.1)
[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.9.2)
[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.9.2/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.9.2)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.9.1).
The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.9.2).

<!-- x-release-please-end -->

Expand All @@ -24,7 +24,7 @@ The REST API documentation can be found on [www.courier.com](https://www.courier
### Gradle

```kotlin
implementation("com.courier:courier-java:4.9.1")
implementation("com.courier:courier-java:4.9.2")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.courier:courier-java:4.9.1")
<dependency>
<groupId>com.courier</groupId>
<artifactId>courier-java</artifactId>
<version>4.9.1</version>
<version>4.9.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.courier"
version = "4.9.1" // x-release-please-version
version = "4.9.2" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ 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 ElementalContent
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val elements: JsonField<List<ElementalNode>>,
private val version: JsonField<String>,
private val brand: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

Expand All @@ -34,8 +32,7 @@ private constructor(
@ExcludeMissing
elements: JsonField<List<ElementalNode>> = JsonMissing.of(),
@JsonProperty("version") @ExcludeMissing version: JsonField<String> = JsonMissing.of(),
@JsonProperty("brand") @ExcludeMissing brand: JsonField<String> = JsonMissing.of(),
) : this(elements, version, brand, mutableMapOf())
) : this(elements, version, mutableMapOf())

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type or is
Expand All @@ -51,12 +48,6 @@ private constructor(
*/
fun version(): String = version.getRequired("version")

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun brand(): Optional<String> = brand.getOptional("brand")

/**
* Returns the raw JSON value of [elements].
*
Expand All @@ -73,13 +64,6 @@ private constructor(
*/
@JsonProperty("version") @ExcludeMissing fun _version(): JsonField<String> = version

/**
* 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<String> = brand

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand Down Expand Up @@ -111,14 +95,12 @@ private constructor(

private var elements: JsonField<MutableList<ElementalNode>>? = null
private var version: JsonField<String>? = null
private var brand: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
internal fun from(elementalContent: ElementalContent) = apply {
elements = elementalContent.elements.map { it.toMutableList() }
version = elementalContent.version
brand = elementalContent.brand
additionalProperties = elementalContent.additionalProperties.toMutableMap()
}

Expand Down Expand Up @@ -205,19 +187,6 @@ private constructor(
*/
fun version(version: JsonField<String>) = apply { this.version = version }

fun brand(brand: String?) = brand(JsonField.ofNullable(brand))

/** Alias for calling [Builder.brand] with `brand.orElse(null)`. */
fun brand(brand: Optional<String>) = brand(brand.getOrNull())

/**
* Sets [Builder.brand] to an arbitrary JSON value.
*
* You should usually call [Builder.brand] with a well-typed [String] value instead. This
* method is primarily for setting the field to an undocumented or not yet supported value.
*/
fun brand(brand: JsonField<String>) = apply { this.brand = brand }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down Expand Up @@ -254,7 +223,6 @@ private constructor(
ElementalContent(
checkRequired("elements", elements).map { it.toImmutable() },
checkRequired("version", version),
brand,
additionalProperties.toMutableMap(),
)
}
Expand All @@ -268,7 +236,6 @@ private constructor(

elements().forEach { it.validate() }
version()
brand()
validated = true
}

Expand All @@ -288,8 +255,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(elements.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(if (version.asKnown().isPresent) 1 else 0) +
(if (brand.asKnown().isPresent) 1 else 0)
(if (version.asKnown().isPresent) 1 else 0)

override fun equals(other: Any?): Boolean {
if (this === other) {
Expand All @@ -299,16 +265,13 @@ private constructor(
return other is ElementalContent &&
elements == other.elements &&
version == other.version &&
brand == other.brand &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(elements, version, brand, additionalProperties)
}
private val hashCode: Int by lazy { Objects.hash(elements, version, additionalProperties) }

override fun hashCode(): Int = hashCode

override fun toString() =
"ElementalContent{elements=$elements, version=$version, brand=$brand, additionalProperties=$additionalProperties}"
"ElementalContent{elements=$elements, version=$version, additionalProperties=$additionalProperties}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ internal class ElementalContentTest {
.build()
)
.version("version")
.brand("brand")
.build()

assertThat(elementalContent.elements())
Expand All @@ -39,7 +38,6 @@ internal class ElementalContentTest {
)
)
assertThat(elementalContent.version()).isEqualTo("version")
assertThat(elementalContent.brand()).contains("brand")
}

@Test
Expand All @@ -57,7 +55,6 @@ internal class ElementalContentTest {
.build()
)
.version("version")
.brand("brand")
.build()

val roundtrippedElementalContent =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ internal class PutTenantTemplateRequestTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down Expand Up @@ -113,7 +112,6 @@ internal class PutTenantTemplateRequestTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down Expand Up @@ -199,7 +197,6 @@ internal class PutTenantTemplateRequestTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ internal class TenantTemplateInputTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down Expand Up @@ -106,7 +105,6 @@ internal class TenantTemplateInputTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
assertThat(tenantTemplateInput.channels())
Expand Down Expand Up @@ -190,7 +188,6 @@ internal class TenantTemplateInputTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ internal class TemplateReplaceParamsTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down Expand Up @@ -154,7 +153,6 @@ internal class TemplateReplaceParamsTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down Expand Up @@ -243,7 +241,6 @@ internal class TemplateReplaceParamsTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ internal class TemplateServiceAsyncTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ internal class TemplateServiceTest {
.build()
)
.version("version")
.brand("brand")
.build()
)
.channels(
Expand Down
Loading