io.bloombox.schema.security.IdentityToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java RPCAPI client for the Bloombox Cloud.
The newest version!
/*
* Copyright 2019, Momentum Ideas, Co. All rights reserved.
*
* Source and object computer code contained herein is the private intellectual
* property of Momentum Ideas Co., a Delaware Corporation. Use of this
* code in source form requires permission in writing before use or the
* assembly, distribution, or publishing of derivative works, for commercial
* purposes or any other purpose, from a duly authorized officer of Momentum
* Ideas Co.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: security/IdentityToken.proto
package io.bloombox.schema.security;
/**
*
* Specifies an individual token asserting the identity of a user. An identity token does not make any claim related to
* authorization, only identity.
*
*
* Protobuf type {@code bloombox.security.IdentityToken}
*/
public final class IdentityToken extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bloombox.security.IdentityToken)
IdentityTokenOrBuilder {
private static final long serialVersionUID = 0L;
// Use IdentityToken.newBuilder() to construct.
private IdentityToken(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private IdentityToken() {
uid_ = "";
encoded_ = "";
issuer_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private IdentityToken(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
uid_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
encoded_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
issuer_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.bloombox.schema.security.IdentityTokenOuterClass.internal_static_bloombox_security_IdentityToken_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.bloombox.schema.security.IdentityTokenOuterClass.internal_static_bloombox_security_IdentityToken_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.bloombox.schema.security.IdentityToken.class, io.bloombox.schema.security.IdentityToken.Builder.class);
}
public static final int UID_FIELD_NUMBER = 1;
private volatile java.lang.Object uid_;
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
}
}
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public com.google.protobuf.ByteString
getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENCODED_FIELD_NUMBER = 2;
private volatile java.lang.Object encoded_;
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public java.lang.String getEncoded() {
java.lang.Object ref = encoded_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
encoded_ = s;
return s;
}
}
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public com.google.protobuf.ByteString
getEncodedBytes() {
java.lang.Object ref = encoded_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
encoded_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ISSUER_FIELD_NUMBER = 3;
private int issuer_;
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public int getIssuerValue() {
return issuer_;
}
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public io.bloombox.schema.security.IdentityTokenIssuer getIssuer() {
@SuppressWarnings("deprecation")
io.bloombox.schema.security.IdentityTokenIssuer result = io.bloombox.schema.security.IdentityTokenIssuer.valueOf(issuer_);
return result == null ? io.bloombox.schema.security.IdentityTokenIssuer.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getUidBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uid_);
}
if (!getEncodedBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, encoded_);
}
if (issuer_ != io.bloombox.schema.security.IdentityTokenIssuer.INTERNAL.getNumber()) {
output.writeEnum(3, issuer_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getUidBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uid_);
}
if (!getEncodedBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, encoded_);
}
if (issuer_ != io.bloombox.schema.security.IdentityTokenIssuer.INTERNAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, issuer_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.bloombox.schema.security.IdentityToken)) {
return super.equals(obj);
}
io.bloombox.schema.security.IdentityToken other = (io.bloombox.schema.security.IdentityToken) obj;
if (!getUid()
.equals(other.getUid())) return false;
if (!getEncoded()
.equals(other.getEncoded())) return false;
if (issuer_ != other.issuer_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid().hashCode();
hash = (37 * hash) + ENCODED_FIELD_NUMBER;
hash = (53 * hash) + getEncoded().hashCode();
hash = (37 * hash) + ISSUER_FIELD_NUMBER;
hash = (53 * hash) + issuer_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.bloombox.schema.security.IdentityToken parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.bloombox.schema.security.IdentityToken parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.bloombox.schema.security.IdentityToken parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.bloombox.schema.security.IdentityToken prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Specifies an individual token asserting the identity of a user. An identity token does not make any claim related to
* authorization, only identity.
*
*
* Protobuf type {@code bloombox.security.IdentityToken}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:bloombox.security.IdentityToken)
io.bloombox.schema.security.IdentityTokenOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.bloombox.schema.security.IdentityTokenOuterClass.internal_static_bloombox_security_IdentityToken_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.bloombox.schema.security.IdentityTokenOuterClass.internal_static_bloombox_security_IdentityToken_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.bloombox.schema.security.IdentityToken.class, io.bloombox.schema.security.IdentityToken.Builder.class);
}
// Construct using io.bloombox.schema.security.IdentityToken.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
uid_ = "";
encoded_ = "";
issuer_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.bloombox.schema.security.IdentityTokenOuterClass.internal_static_bloombox_security_IdentityToken_descriptor;
}
@java.lang.Override
public io.bloombox.schema.security.IdentityToken getDefaultInstanceForType() {
return io.bloombox.schema.security.IdentityToken.getDefaultInstance();
}
@java.lang.Override
public io.bloombox.schema.security.IdentityToken build() {
io.bloombox.schema.security.IdentityToken result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.bloombox.schema.security.IdentityToken buildPartial() {
io.bloombox.schema.security.IdentityToken result = new io.bloombox.schema.security.IdentityToken(this);
result.uid_ = uid_;
result.encoded_ = encoded_;
result.issuer_ = issuer_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.bloombox.schema.security.IdentityToken) {
return mergeFrom((io.bloombox.schema.security.IdentityToken)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.bloombox.schema.security.IdentityToken other) {
if (other == io.bloombox.schema.security.IdentityToken.getDefaultInstance()) return this;
if (!other.getUid().isEmpty()) {
uid_ = other.uid_;
onChanged();
}
if (!other.getEncoded().isEmpty()) {
encoded_ = other.encoded_;
onChanged();
}
if (other.issuer_ != 0) {
setIssuerValue(other.getIssuerValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.bloombox.schema.security.IdentityToken parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.bloombox.schema.security.IdentityToken) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object uid_ = "";
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public com.google.protobuf.ByteString
getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public Builder setUid(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uid_ = value;
onChanged();
return this;
}
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public Builder clearUid() {
uid_ = getDefaultInstance().getUid();
onChanged();
return this;
}
/**
*
* ID for the subject user.
*
*
* string uid = 1;
*/
public Builder setUidBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uid_ = value;
onChanged();
return this;
}
private java.lang.Object encoded_ = "";
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public java.lang.String getEncoded() {
java.lang.Object ref = encoded_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
encoded_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public com.google.protobuf.ByteString
getEncodedBytes() {
java.lang.Object ref = encoded_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
encoded_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public Builder setEncoded(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
encoded_ = value;
onChanged();
return this;
}
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public Builder clearEncoded() {
encoded_ = getDefaultInstance().getEncoded();
onChanged();
return this;
}
/**
*
* Encoded JWT identity token.
*
*
* string encoded = 2;
*/
public Builder setEncodedBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
encoded_ = value;
onChanged();
return this;
}
private int issuer_ = 0;
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public int getIssuerValue() {
return issuer_;
}
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public Builder setIssuerValue(int value) {
issuer_ = value;
onChanged();
return this;
}
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public io.bloombox.schema.security.IdentityTokenIssuer getIssuer() {
@SuppressWarnings("deprecation")
io.bloombox.schema.security.IdentityTokenIssuer result = io.bloombox.schema.security.IdentityTokenIssuer.valueOf(issuer_);
return result == null ? io.bloombox.schema.security.IdentityTokenIssuer.UNRECOGNIZED : result;
}
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public Builder setIssuer(io.bloombox.schema.security.IdentityTokenIssuer value) {
if (value == null) {
throw new NullPointerException();
}
issuer_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Token issuer, or authorizing IdP (Identity Provider).
*
*
* .bloombox.security.IdentityTokenIssuer issuer = 3;
*/
public Builder clearIssuer() {
issuer_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bloombox.security.IdentityToken)
}
// @@protoc_insertion_point(class_scope:bloombox.security.IdentityToken)
private static final io.bloombox.schema.security.IdentityToken DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.bloombox.schema.security.IdentityToken();
}
public static io.bloombox.schema.security.IdentityToken getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public IdentityToken parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new IdentityToken(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.bloombox.schema.security.IdentityToken getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy