org.finos.tracdap.config.ServiceConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tracdap-api-config Show documentation
Show all versions of tracdap-api-config Show documentation
TRAC D.A.P. config library, contains data structures used for config files (and other config sources)
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tracdap/config/common.proto
// Protobuf Java Version: 4.28.2
package org.finos.tracdap.config;
/**
* Protobuf type {@code tracdap.config.ServiceConfig}
*/
public final class ServiceConfig extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:tracdap.config.ServiceConfig)
ServiceConfigOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ServiceConfig.class.getName());
}
// Use ServiceConfig.newBuilder() to construct.
private ServiceConfig(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ServiceConfig() {
alias_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.finos.tracdap.config.Common.internal_static_tracdap_config_ServiceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.finos.tracdap.config.Common.internal_static_tracdap_config_ServiceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.finos.tracdap.config.ServiceConfig.class, org.finos.tracdap.config.ServiceConfig.Builder.class);
}
private int bitField0_;
public static final int ENABLED_FIELD_NUMBER = 1;
private boolean enabled_ = false;
/**
* optional bool enabled = 1;
* @return Whether the enabled field is set.
*/
@java.lang.Override
public boolean hasEnabled() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional bool enabled = 1;
* @return The enabled.
*/
@java.lang.Override
public boolean getEnabled() {
return enabled_;
}
public static final int ALIAS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object alias_ = "";
/**
* string alias = 2;
* @return The alias.
*/
@java.lang.Override
public java.lang.String getAlias() {
java.lang.Object ref = alias_;
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();
alias_ = s;
return s;
}
}
/**
* string alias = 2;
* @return The bytes for alias.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAliasBytes() {
java.lang.Object ref = alias_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
alias_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_FIELD_NUMBER = 3;
private int port_ = 0;
/**
* uint32 port = 3;
* @return The port.
*/
@java.lang.Override
public int getPort() {
return port_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(1, enabled_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(alias_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, alias_);
}
if (port_ != 0) {
output.writeUInt32(3, port_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, enabled_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(alias_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, alias_);
}
if (port_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, port_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.finos.tracdap.config.ServiceConfig)) {
return super.equals(obj);
}
org.finos.tracdap.config.ServiceConfig other = (org.finos.tracdap.config.ServiceConfig) obj;
if (hasEnabled() != other.hasEnabled()) return false;
if (hasEnabled()) {
if (getEnabled()
!= other.getEnabled()) return false;
}
if (!getAlias()
.equals(other.getAlias())) return false;
if (getPort()
!= other.getPort()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasEnabled()) {
hash = (37 * hash) + ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnabled());
}
hash = (37 * hash) + ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getAlias().hashCode();
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.finos.tracdap.config.ServiceConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.finos.tracdap.config.ServiceConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.finos.tracdap.config.ServiceConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.finos.tracdap.config.ServiceConfig 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.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tracdap.config.ServiceConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:tracdap.config.ServiceConfig)
org.finos.tracdap.config.ServiceConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.finos.tracdap.config.Common.internal_static_tracdap_config_ServiceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.finos.tracdap.config.Common.internal_static_tracdap_config_ServiceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.finos.tracdap.config.ServiceConfig.class, org.finos.tracdap.config.ServiceConfig.Builder.class);
}
// Construct using org.finos.tracdap.config.ServiceConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
enabled_ = false;
alias_ = "";
port_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.finos.tracdap.config.Common.internal_static_tracdap_config_ServiceConfig_descriptor;
}
@java.lang.Override
public org.finos.tracdap.config.ServiceConfig getDefaultInstanceForType() {
return org.finos.tracdap.config.ServiceConfig.getDefaultInstance();
}
@java.lang.Override
public org.finos.tracdap.config.ServiceConfig build() {
org.finos.tracdap.config.ServiceConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.finos.tracdap.config.ServiceConfig buildPartial() {
org.finos.tracdap.config.ServiceConfig result = new org.finos.tracdap.config.ServiceConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.finos.tracdap.config.ServiceConfig result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.enabled_ = enabled_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.alias_ = alias_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.port_ = port_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.finos.tracdap.config.ServiceConfig) {
return mergeFrom((org.finos.tracdap.config.ServiceConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.finos.tracdap.config.ServiceConfig other) {
if (other == org.finos.tracdap.config.ServiceConfig.getDefaultInstance()) return this;
if (other.hasEnabled()) {
setEnabled(other.getEnabled());
}
if (!other.getAlias().isEmpty()) {
alias_ = other.alias_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getPort() != 0) {
setPort(other.getPort());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
enabled_ = input.readBool();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
alias_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
port_ = input.readUInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private boolean enabled_ ;
/**
* optional bool enabled = 1;
* @return Whether the enabled field is set.
*/
@java.lang.Override
public boolean hasEnabled() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional bool enabled = 1;
* @return The enabled.
*/
@java.lang.Override
public boolean getEnabled() {
return enabled_;
}
/**
* optional bool enabled = 1;
* @param value The enabled to set.
* @return This builder for chaining.
*/
public Builder setEnabled(boolean value) {
enabled_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* optional bool enabled = 1;
* @return This builder for chaining.
*/
public Builder clearEnabled() {
bitField0_ = (bitField0_ & ~0x00000001);
enabled_ = false;
onChanged();
return this;
}
private java.lang.Object alias_ = "";
/**
* string alias = 2;
* @return The alias.
*/
public java.lang.String getAlias() {
java.lang.Object ref = alias_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
alias_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string alias = 2;
* @return The bytes for alias.
*/
public com.google.protobuf.ByteString
getAliasBytes() {
java.lang.Object ref = alias_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
alias_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string alias = 2;
* @param value The alias to set.
* @return This builder for chaining.
*/
public Builder setAlias(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
alias_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string alias = 2;
* @return This builder for chaining.
*/
public Builder clearAlias() {
alias_ = getDefaultInstance().getAlias();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string alias = 2;
* @param value The bytes for alias to set.
* @return This builder for chaining.
*/
public Builder setAliasBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
alias_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int port_ ;
/**
* uint32 port = 3;
* @return The port.
*/
@java.lang.Override
public int getPort() {
return port_;
}
/**
* uint32 port = 3;
* @param value The port to set.
* @return This builder for chaining.
*/
public Builder setPort(int value) {
port_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* uint32 port = 3;
* @return This builder for chaining.
*/
public Builder clearPort() {
bitField0_ = (bitField0_ & ~0x00000004);
port_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:tracdap.config.ServiceConfig)
}
// @@protoc_insertion_point(class_scope:tracdap.config.ServiceConfig)
private static final org.finos.tracdap.config.ServiceConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.finos.tracdap.config.ServiceConfig();
}
public static org.finos.tracdap.config.ServiceConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServiceConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.finos.tracdap.config.ServiceConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}