com.airbyte.api.models.shared.SourceGithubPersonalAccessToken Maven / Gradle / Ivy
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
package com.airbyte.api.models.shared;
import com.airbyte.api.utils.LazySingletonValue;
import com.airbyte.api.utils.Utils;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.InputStream;
import java.lang.Deprecated;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Optional;
public class SourceGithubPersonalAccessToken {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("option_title")
private Optional extends SourceGithubOptionTitle> optionTitle;
/**
* Log into GitHub and then generate a <a href="https://github.com/settings/tokens">personal access token</a>. To load balance your API quota consumption across multiple API tokens, input multiple tokens separated with ","
*/
@JsonProperty("personal_access_token")
private String personalAccessToken;
@JsonCreator
public SourceGithubPersonalAccessToken(
@JsonProperty("personal_access_token") String personalAccessToken) {
Utils.checkNotNull(personalAccessToken, "personalAccessToken");
this.optionTitle = Builder._SINGLETON_VALUE_OptionTitle.value();
this.personalAccessToken = personalAccessToken;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional optionTitle() {
return (Optional) optionTitle;
}
/**
* Log into GitHub and then generate a <a href="https://github.com/settings/tokens">personal access token</a>. To load balance your API quota consumption across multiple API tokens, input multiple tokens separated with ","
*/
@JsonIgnore
public String personalAccessToken() {
return personalAccessToken;
}
public final static Builder builder() {
return new Builder();
}
/**
* Log into GitHub and then generate a <a href="https://github.com/settings/tokens">personal access token</a>. To load balance your API quota consumption across multiple API tokens, input multiple tokens separated with ","
*/
public SourceGithubPersonalAccessToken withPersonalAccessToken(String personalAccessToken) {
Utils.checkNotNull(personalAccessToken, "personalAccessToken");
this.personalAccessToken = personalAccessToken;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SourceGithubPersonalAccessToken other = (SourceGithubPersonalAccessToken) o;
return
java.util.Objects.deepEquals(this.optionTitle, other.optionTitle) &&
java.util.Objects.deepEquals(this.personalAccessToken, other.personalAccessToken);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
optionTitle,
personalAccessToken);
}
@Override
public String toString() {
return Utils.toString(SourceGithubPersonalAccessToken.class,
"optionTitle", optionTitle,
"personalAccessToken", personalAccessToken);
}
public final static class Builder {
private String personalAccessToken;
private Builder() {
// force use of static builder() method
}
/**
* Log into GitHub and then generate a <a href="https://github.com/settings/tokens">personal access token</a>. To load balance your API quota consumption across multiple API tokens, input multiple tokens separated with ","
*/
public Builder personalAccessToken(String personalAccessToken) {
Utils.checkNotNull(personalAccessToken, "personalAccessToken");
this.personalAccessToken = personalAccessToken;
return this;
}
public SourceGithubPersonalAccessToken build() {
return new SourceGithubPersonalAccessToken(
personalAccessToken);
}
private static final LazySingletonValue> _SINGLETON_VALUE_OptionTitle =
new LazySingletonValue<>(
"option_title",
"\"PAT Credentials\"",
new TypeReference>() {});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy