com.google.api.tools.framework.yaml.TestMapValue Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/google/api/tools/framework/yaml/testdata/test_config.proto
package com.google.api.tools.framework.yaml;
/**
* Protobuf type {@code test.yaml.TestMapValue}
*/
public final class TestMapValue extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:test.yaml.TestMapValue)
TestMapValueOrBuilder {
// Use TestMapValue.newBuilder() to construct.
private TestMapValue(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private TestMapValue() {
mapValue_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private TestMapValue(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
mapValue_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
mapOfMap_ = com.google.protobuf.MapField.newMapField(
MapOfMapDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
mapOfMap = input.readMessage(
MapOfMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
mapOfMap_.getMutableMap().put(mapOfMap.getKey(), mapOfMap.getValue());
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetMapOfMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.tools.framework.yaml.TestMapValue.class, com.google.api.tools.framework.yaml.TestMapValue.Builder.class);
}
private int bitField0_;
public static final int MAP_VALUE_FIELD_NUMBER = 1;
private volatile java.lang.Object mapValue_;
/**
* optional string map_value = 1;
*/
public java.lang.String getMapValue() {
java.lang.Object ref = mapValue_;
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();
mapValue_ = s;
return s;
}
}
/**
* optional string map_value = 1;
*/
public com.google.protobuf.ByteString
getMapValueBytes() {
java.lang.Object ref = mapValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mapValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAP_OF_MAP_FIELD_NUMBER = 2;
private static final class MapOfMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_MapOfMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> mapOfMap_;
private com.google.protobuf.MapField
internalGetMapOfMap() {
if (mapOfMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MapOfMapDefaultEntryHolder.defaultEntry);
}
return mapOfMap_;
}
/**
* map<string, string> map_of_map = 2;
*/
public java.util.Map getMapOfMap() {
return internalGetMapOfMap().getMap();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getMapValueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, mapValue_);
}
for (java.util.Map.Entry entry
: internalGetMapOfMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
mapOfMap = MapOfMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(2, mapOfMap);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getMapValueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mapValue_);
}
for (java.util.Map.Entry entry
: internalGetMapOfMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
mapOfMap = MapOfMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, mapOfMap);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.tools.framework.yaml.TestMapValue 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 com.google.api.tools.framework.yaml.TestMapValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.tools.framework.yaml.TestMapValue 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 com.google.api.tools.framework.yaml.TestMapValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.tools.framework.yaml.TestMapValue parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.tools.framework.yaml.TestMapValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 test.yaml.TestMapValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:test.yaml.TestMapValue)
com.google.api.tools.framework.yaml.TestMapValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetMapOfMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableMapOfMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.tools.framework.yaml.TestMapValue.class, com.google.api.tools.framework.yaml.TestMapValue.Builder.class);
}
// Construct using com.google.api.tools.framework.yaml.TestMapValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
mapValue_ = "";
internalGetMutableMapOfMap().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.tools.framework.yaml.TestConfigProto.internal_static_test_yaml_TestMapValue_descriptor;
}
public com.google.api.tools.framework.yaml.TestMapValue getDefaultInstanceForType() {
return com.google.api.tools.framework.yaml.TestMapValue.getDefaultInstance();
}
public com.google.api.tools.framework.yaml.TestMapValue build() {
com.google.api.tools.framework.yaml.TestMapValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.tools.framework.yaml.TestMapValue buildPartial() {
com.google.api.tools.framework.yaml.TestMapValue result = new com.google.api.tools.framework.yaml.TestMapValue(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.mapValue_ = mapValue_;
result.mapOfMap_ = internalGetMapOfMap();
result.mapOfMap_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.tools.framework.yaml.TestMapValue) {
return mergeFrom((com.google.api.tools.framework.yaml.TestMapValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.tools.framework.yaml.TestMapValue other) {
if (other == com.google.api.tools.framework.yaml.TestMapValue.getDefaultInstance()) return this;
if (!other.getMapValue().isEmpty()) {
mapValue_ = other.mapValue_;
onChanged();
}
internalGetMutableMapOfMap().mergeFrom(
other.internalGetMapOfMap());
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.tools.framework.yaml.TestMapValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.tools.framework.yaml.TestMapValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object mapValue_ = "";
/**
* optional string map_value = 1;
*/
public java.lang.String getMapValue() {
java.lang.Object ref = mapValue_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mapValue_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string map_value = 1;
*/
public com.google.protobuf.ByteString
getMapValueBytes() {
java.lang.Object ref = mapValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mapValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string map_value = 1;
*/
public Builder setMapValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
mapValue_ = value;
onChanged();
return this;
}
/**
* optional string map_value = 1;
*/
public Builder clearMapValue() {
mapValue_ = getDefaultInstance().getMapValue();
onChanged();
return this;
}
/**
* optional string map_value = 1;
*/
public Builder setMapValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
mapValue_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> mapOfMap_;
private com.google.protobuf.MapField
internalGetMapOfMap() {
if (mapOfMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MapOfMapDefaultEntryHolder.defaultEntry);
}
return mapOfMap_;
}
private com.google.protobuf.MapField
internalGetMutableMapOfMap() {
onChanged();;
if (mapOfMap_ == null) {
mapOfMap_ = com.google.protobuf.MapField.newMapField(
MapOfMapDefaultEntryHolder.defaultEntry);
}
if (!mapOfMap_.isMutable()) {
mapOfMap_ = mapOfMap_.copy();
}
return mapOfMap_;
}
/**
* map<string, string> map_of_map = 2;
*/
public java.util.Map getMapOfMap() {
return internalGetMapOfMap().getMap();
}
/**
* map<string, string> map_of_map = 2;
*/
public java.util.Map
getMutableMapOfMap() {
return internalGetMutableMapOfMap().getMutableMap();
}
/**
* map<string, string> map_of_map = 2;
*/
public Builder putAllMapOfMap(
java.util.Map values) {
getMutableMapOfMap().putAll(values);
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:test.yaml.TestMapValue)
}
// @@protoc_insertion_point(class_scope:test.yaml.TestMapValue)
private static final com.google.api.tools.framework.yaml.TestMapValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.tools.framework.yaml.TestMapValue();
}
public static com.google.api.tools.framework.yaml.TestMapValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TestMapValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TestMapValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.api.tools.framework.yaml.TestMapValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy