All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.finos.tracdap.api.ResourceInfoResponse Maven / Gradle / Ivy

Go to download

TRAC D.A.P. platform API, contains service API definitions for the TRAC platform services

There is a newer version: 0.6.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tracdap/api/metadata.proto
// Protobuf Java Version: 4.28.2

package org.finos.tracdap.api;

/**
 * 
 * *
 * Response object for a resourceInfo() API call.
 *
 * @see TracMetadataApi.resourceInfo
 * 
* * Protobuf type {@code tracdap.api.ResourceInfoResponse} */ public final class ResourceInfoResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tracdap.api.ResourceInfoResponse) ResourceInfoResponseOrBuilder { 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= */ "", ResourceInfoResponse.class.getName()); } // Use ResourceInfoResponse.newBuilder() to construct. private ResourceInfoResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ResourceInfoResponse() { resourceType_ = 0; resourceKey_ = ""; protocol_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetProperties(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.ResourceInfoResponse.class, org.finos.tracdap.api.ResourceInfoResponse.Builder.class); } public static final int RESOURCETYPE_FIELD_NUMBER = 1; private int resourceType_ = 0; /** *
   * / The type of selected resource.
   * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @return The enum numeric value on the wire for resourceType. */ @java.lang.Override public int getResourceTypeValue() { return resourceType_; } /** *
   * / The type of selected resource.
   * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @return The resourceType. */ @java.lang.Override public org.finos.tracdap.metadata.ResourceType getResourceType() { org.finos.tracdap.metadata.ResourceType result = org.finos.tracdap.metadata.ResourceType.forNumber(resourceType_); return result == null ? org.finos.tracdap.metadata.ResourceType.UNRECOGNIZED : result; } public static final int RESOURCEKEY_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object resourceKey_ = ""; /** *
   * / Resource key of the selected resource.
   * 
* * string resourceKey = 2; * @return The resourceKey. */ @java.lang.Override public java.lang.String getResourceKey() { java.lang.Object ref = resourceKey_; 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(); resourceKey_ = s; return s; } } /** *
   * / Resource key of the selected resource.
   * 
* * string resourceKey = 2; * @return The bytes for resourceKey. */ @java.lang.Override public com.google.protobuf.ByteString getResourceKeyBytes() { java.lang.Object ref = resourceKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PROTOCOL_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object protocol_ = ""; /** *
   * *
   * Protocol of the selected resource.
   *
   * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
   * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
   * plugin to be installed.
   * 
* * string protocol = 3; * @return The protocol. */ @java.lang.Override public java.lang.String getProtocol() { java.lang.Object ref = protocol_; 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(); protocol_ = s; return s; } } /** *
   * *
   * Protocol of the selected resource.
   *
   * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
   * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
   * plugin to be installed.
   * 
* * string protocol = 3; * @return The bytes for protocol. */ @java.lang.Override public com.google.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PROPERTIES_FIELD_NUMBER = 4; private static final class PropertiesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_PropertiesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField internalGetProperties() { if (properties_ == null) { return com.google.protobuf.MapField.emptyMapField( PropertiesDefaultEntryHolder.defaultEntry); } return properties_; } public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** *
   * *
   * Public properties of the selected resource.
   *
   * These properties are set in the resource configuration. Certain resource types require
   * certain properties depending on the protocol, however additional arbitrary properties
   * can be added to support client applications.
   * 
* * map<string, string> properties = 4; */ @java.lang.Override public boolean containsProperties( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** * Use {@link #getPropertiesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getProperties() { return getPropertiesMap(); } /** *
   * *
   * Public properties of the selected resource.
   *
   * These properties are set in the resource configuration. Certain resource types require
   * certain properties depending on the protocol, however additional arbitrary properties
   * can be added to support client applications.
   * 
* * map<string, string> properties = 4; */ @java.lang.Override public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } /** *
   * *
   * Public properties of the selected resource.
   *
   * These properties are set in the resource configuration. Certain resource types require
   * certain properties depending on the protocol, however additional arbitrary properties
   * can be added to support client applications.
   * 
* * map<string, string> properties = 4; */ @java.lang.Override public /* nullable */ java.lang.String getPropertiesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * *
   * Public properties of the selected resource.
   *
   * These properties are set in the resource configuration. Certain resource types require
   * certain properties depending on the protocol, however additional arbitrary properties
   * can be added to support client applications.
   * 
* * map<string, string> properties = 4; */ @java.lang.Override public java.lang.String getPropertiesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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 (resourceType_ != org.finos.tracdap.metadata.ResourceType.RESOURCE_TYPE_NOT_SET.getNumber()) { output.writeEnum(1, resourceType_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceKey_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceKey_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) { com.google.protobuf.GeneratedMessage.writeString(output, 3, protocol_); } com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (resourceType_ != org.finos.tracdap.metadata.ResourceType.RESOURCE_TYPE_NOT_SET.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, resourceType_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceKey_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceKey_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(3, protocol_); } for (java.util.Map.Entry entry : internalGetProperties().getMap().entrySet()) { com.google.protobuf.MapEntry properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, properties__); } 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.api.ResourceInfoResponse)) { return super.equals(obj); } org.finos.tracdap.api.ResourceInfoResponse other = (org.finos.tracdap.api.ResourceInfoResponse) obj; if (resourceType_ != other.resourceType_) return false; if (!getResourceKey() .equals(other.getResourceKey())) return false; if (!getProtocol() .equals(other.getProtocol())) return false; if (!internalGetProperties().equals( other.internalGetProperties())) 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(); hash = (37 * hash) + RESOURCETYPE_FIELD_NUMBER; hash = (53 * hash) + resourceType_; hash = (37 * hash) + RESOURCEKEY_FIELD_NUMBER; hash = (53 * hash) + getResourceKey().hashCode(); hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; hash = (53 * hash) + getProtocol().hashCode(); if (!internalGetProperties().getMap().isEmpty()) { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + internalGetProperties().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.finos.tracdap.api.ResourceInfoResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.ResourceInfoResponse 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.api.ResourceInfoResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.ResourceInfoResponse 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.api.ResourceInfoResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.ResourceInfoResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.finos.tracdap.api.ResourceInfoResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.ResourceInfoResponse 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.api.ResourceInfoResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.finos.tracdap.api.ResourceInfoResponse 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.api.ResourceInfoResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.ResourceInfoResponse 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.api.ResourceInfoResponse 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; } /** *
   * *
   * Response object for a resourceInfo() API call.
   *
   * @see TracMetadataApi.resourceInfo
   * 
* * Protobuf type {@code tracdap.api.ResourceInfoResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tracdap.api.ResourceInfoResponse) org.finos.tracdap.api.ResourceInfoResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetProperties(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 4: return internalGetMutableProperties(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.ResourceInfoResponse.class, org.finos.tracdap.api.ResourceInfoResponse.Builder.class); } // Construct using org.finos.tracdap.api.ResourceInfoResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; resourceType_ = 0; resourceKey_ = ""; protocol_ = ""; internalGetMutableProperties().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.finos.tracdap.api.Metadata.internal_static_tracdap_api_ResourceInfoResponse_descriptor; } @java.lang.Override public org.finos.tracdap.api.ResourceInfoResponse getDefaultInstanceForType() { return org.finos.tracdap.api.ResourceInfoResponse.getDefaultInstance(); } @java.lang.Override public org.finos.tracdap.api.ResourceInfoResponse build() { org.finos.tracdap.api.ResourceInfoResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.finos.tracdap.api.ResourceInfoResponse buildPartial() { org.finos.tracdap.api.ResourceInfoResponse result = new org.finos.tracdap.api.ResourceInfoResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.finos.tracdap.api.ResourceInfoResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.resourceType_ = resourceType_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.resourceKey_ = resourceKey_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.protocol_ = protocol_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.properties_ = internalGetProperties(); result.properties_.makeImmutable(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.finos.tracdap.api.ResourceInfoResponse) { return mergeFrom((org.finos.tracdap.api.ResourceInfoResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.finos.tracdap.api.ResourceInfoResponse other) { if (other == org.finos.tracdap.api.ResourceInfoResponse.getDefaultInstance()) return this; if (other.resourceType_ != 0) { setResourceTypeValue(other.getResourceTypeValue()); } if (!other.getResourceKey().isEmpty()) { resourceKey_ = other.resourceKey_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getProtocol().isEmpty()) { protocol_ = other.protocol_; bitField0_ |= 0x00000004; onChanged(); } internalGetMutableProperties().mergeFrom( other.internalGetProperties()); bitField0_ |= 0x00000008; 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: { resourceType_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { resourceKey_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { protocol_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { com.google.protobuf.MapEntry properties__ = input.readMessage( PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableProperties().getMutableMap().put( properties__.getKey(), properties__.getValue()); bitField0_ |= 0x00000008; break; } // case 34 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 int resourceType_ = 0; /** *
     * / The type of selected resource.
     * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @return The enum numeric value on the wire for resourceType. */ @java.lang.Override public int getResourceTypeValue() { return resourceType_; } /** *
     * / The type of selected resource.
     * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @param value The enum numeric value on the wire for resourceType to set. * @return This builder for chaining. */ public Builder setResourceTypeValue(int value) { resourceType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * / The type of selected resource.
     * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @return The resourceType. */ @java.lang.Override public org.finos.tracdap.metadata.ResourceType getResourceType() { org.finos.tracdap.metadata.ResourceType result = org.finos.tracdap.metadata.ResourceType.forNumber(resourceType_); return result == null ? org.finos.tracdap.metadata.ResourceType.UNRECOGNIZED : result; } /** *
     * / The type of selected resource.
     * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @param value The resourceType to set. * @return This builder for chaining. */ public Builder setResourceType(org.finos.tracdap.metadata.ResourceType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; resourceType_ = value.getNumber(); onChanged(); return this; } /** *
     * / The type of selected resource.
     * 
* * .tracdap.metadata.ResourceType resourceType = 1; * @return This builder for chaining. */ public Builder clearResourceType() { bitField0_ = (bitField0_ & ~0x00000001); resourceType_ = 0; onChanged(); return this; } private java.lang.Object resourceKey_ = ""; /** *
     * / Resource key of the selected resource.
     * 
* * string resourceKey = 2; * @return The resourceKey. */ public java.lang.String getResourceKey() { java.lang.Object ref = resourceKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceKey_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * / Resource key of the selected resource.
     * 
* * string resourceKey = 2; * @return The bytes for resourceKey. */ public com.google.protobuf.ByteString getResourceKeyBytes() { java.lang.Object ref = resourceKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * / Resource key of the selected resource.
     * 
* * string resourceKey = 2; * @param value The resourceKey to set. * @return This builder for chaining. */ public Builder setResourceKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resourceKey_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * / Resource key of the selected resource.
     * 
* * string resourceKey = 2; * @return This builder for chaining. */ public Builder clearResourceKey() { resourceKey_ = getDefaultInstance().getResourceKey(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * / Resource key of the selected resource.
     * 
* * string resourceKey = 2; * @param value The bytes for resourceKey to set. * @return This builder for chaining. */ public Builder setResourceKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resourceKey_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object protocol_ = ""; /** *
     * *
     * Protocol of the selected resource.
     *
     * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
     * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
     * plugin to be installed.
     * 
* * string protocol = 3; * @return The protocol. */ public java.lang.String getProtocol() { java.lang.Object ref = protocol_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); protocol_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * *
     * Protocol of the selected resource.
     *
     * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
     * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
     * plugin to be installed.
     * 
* * string protocol = 3; * @return The bytes for protocol. */ public com.google.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * *
     * Protocol of the selected resource.
     *
     * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
     * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
     * plugin to be installed.
     * 
* * string protocol = 3; * @param value The protocol to set. * @return This builder for chaining. */ public Builder setProtocol( java.lang.String value) { if (value == null) { throw new NullPointerException(); } protocol_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * *
     * Protocol of the selected resource.
     *
     * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
     * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
     * plugin to be installed.
     * 
* * string protocol = 3; * @return This builder for chaining. */ public Builder clearProtocol() { protocol_ = getDefaultInstance().getProtocol(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * *
     * Protocol of the selected resource.
     *
     * Resource protocols correspond to TRAC technology plugins. For example, a storage resource
     * might have protocol LOCAL or S3, and would accordingly require the LOCAL or S3 storage
     * plugin to be installed.
     * 
* * string protocol = 3; * @param value The bytes for protocol to set. * @return This builder for chaining. */ public Builder setProtocolBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); protocol_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField internalGetProperties() { if (properties_ == null) { return com.google.protobuf.MapField.emptyMapField( PropertiesDefaultEntryHolder.defaultEntry); } return properties_; } private com.google.protobuf.MapField internalGetMutableProperties() { if (properties_ == null) { properties_ = com.google.protobuf.MapField.newMapField( PropertiesDefaultEntryHolder.defaultEntry); } if (!properties_.isMutable()) { properties_ = properties_.copy(); } bitField0_ |= 0x00000008; onChanged(); return properties_; } public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ @java.lang.Override public boolean containsProperties( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** * Use {@link #getPropertiesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getProperties() { return getPropertiesMap(); } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ @java.lang.Override public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ @java.lang.Override public /* nullable */ java.lang.String getPropertiesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ @java.lang.Override public java.lang.String getPropertiesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearProperties() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableProperties().getMutableMap() .clear(); return this; } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ public Builder removeProperties( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableProperties().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableProperties() { bitField0_ |= 0x00000008; return internalGetMutableProperties().getMutableMap(); } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ public Builder putProperties( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableProperties().getMutableMap() .put(key, value); bitField0_ |= 0x00000008; return this; } /** *
     * *
     * Public properties of the selected resource.
     *
     * These properties are set in the resource configuration. Certain resource types require
     * certain properties depending on the protocol, however additional arbitrary properties
     * can be added to support client applications.
     * 
* * map<string, string> properties = 4; */ public Builder putAllProperties( java.util.Map values) { internalGetMutableProperties().getMutableMap() .putAll(values); bitField0_ |= 0x00000008; return this; } // @@protoc_insertion_point(builder_scope:tracdap.api.ResourceInfoResponse) } // @@protoc_insertion_point(class_scope:tracdap.api.ResourceInfoResponse) private static final org.finos.tracdap.api.ResourceInfoResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.finos.tracdap.api.ResourceInfoResponse(); } public static org.finos.tracdap.api.ResourceInfoResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceInfoResponse 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.api.ResourceInfoResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy