Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- June 12, 2024 #55

Merged
merged 1 commit into from
Jun 12, 2024
Merged
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
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ publishing {
maven(MavenPublication) {
groupId = 'com.courier'
artifactId = 'courier-java'
version = '3.0.3'
version = '3.0.4'
from components.java
pom {
name = 'courier'
description = 'The official SDK of courier'
url = 'https://buildwithfern.com'
description = 'The official Java library for sending notifications with the Courier REST API.'
url = 'https://www.courier.com/docs/reference/'
licenses {
license {
name = 'MIT'
name = 'Optional[MIT]'
}
}
developers {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/courier/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private ClientOptions(
"X-Fern-SDK-Name",
"com.courier.fern:api-sdk",
"X-Fern-SDK-Version",
"3.0.3",
"3.0.4",
"X-Fern-Language",
"JAVA"));
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.courier.api.resources.automations.types;

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

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonDeserialize(builder = AccessorType.Builder.class)
public final class AccessorType {
private final String ref;

private final Map<String, Object> additionalProperties;

private AccessorType(String ref, Map<String, Object> additionalProperties) {
this.ref = ref;
this.additionalProperties = additionalProperties;
}

@JsonProperty("$ref")
public String getRef() {
return ref;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof AccessorType && equalTo((AccessorType) other);
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

private boolean equalTo(AccessorType other) {
return ref.equals(other.ref);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.ref);
}

@java.lang.Override
public String toString() {
return ObjectMappers.stringify(this);
}

public static RefStage builder() {
return new Builder();
}

public interface RefStage {
_FinalStage ref(String ref);

Builder from(AccessorType other);
}

public interface _FinalStage {
AccessorType build();
}

@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements RefStage, _FinalStage {
private String ref;

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

private Builder() {}

@java.lang.Override
public Builder from(AccessorType other) {
ref(other.getRef());
return this;
}

@java.lang.Override
@JsonSetter("$ref")
public _FinalStage ref(String ref) {
this.ref = ref;
return this;
}

@java.lang.Override
public AccessorType build() {
return new AccessorType(ref, additionalProperties);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.courier.api.resources.automations.types;

import com.courier.api.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
import java.util.Objects;

@JsonDeserialize(using = AutomationAddToBatchMaxItemsType.Deserializer.class)
public final class AutomationAddToBatchMaxItemsType {
private final Object value;

private final int type;

private AutomationAddToBatchMaxItemsType(Object value, int type) {
this.value = value;
this.type = type;
}

@JsonValue
public Object get() {
return this.value;
}

public <T> T visit(Visitor<T> visitor) {
if (this.type == 0) {
return visitor.visit((String) this.value);
} else if (this.type == 1) {
return visitor.visit((int) this.value);
}
throw new IllegalStateException("Failed to visit value. This should never happen.");
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof AutomationAddToBatchMaxItemsType && equalTo((AutomationAddToBatchMaxItemsType) other);
}

private boolean equalTo(AutomationAddToBatchMaxItemsType other) {
return value.equals(other.value);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.value);
}

@java.lang.Override
public String toString() {
return this.value.toString();
}

public static AutomationAddToBatchMaxItemsType of(String value) {
return new AutomationAddToBatchMaxItemsType(value, 0);
}

public static AutomationAddToBatchMaxItemsType of(int value) {
return new AutomationAddToBatchMaxItemsType(value, 1);
}

public interface Visitor<T> {
T visit(String value);

T visit(int value);
}

static final class Deserializer extends StdDeserializer<AutomationAddToBatchMaxItemsType> {
Deserializer() {
super(AutomationAddToBatchMaxItemsType.class);
}

@java.lang.Override
public AutomationAddToBatchMaxItemsType deserialize(JsonParser p, DeserializationContext ctxt)
throws IOException {
Object value = p.readValueAs(Object.class);
try {
return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class));
} catch (IllegalArgumentException e) {
}
if (value instanceof Integer) {
return of((Integer) value);
}
throw new JsonParseException(p, "Failed to deserialize");
}
}
}
Loading
Loading