Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- message Image {
- required string uri = 1; //url to the thumbnail
- optional string title = 2; //used in the html ALT
- required int32 width = 3; // of the image
- required int32 height = 4; // of the image
- enum Size {
- SMALL = 0;
- LARGE = 1;
- }
- required Size size = 5; // of the image (in relative terms, provided by cnbc for example)
- }
- */
- public interface ImageOrBuilder extends
- // @@protoc_insertion_point(interface_extends:serializers.protobuf.media.Image)
- com.google.protobuf.MessageOrBuilder {
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- boolean hasUri();
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- java.lang.String getUri();
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- com.google.protobuf.ByteString
- getUriBytes();
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- boolean hasTitle();
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- java.lang.String getTitle();
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- com.google.protobuf.ByteString
- getTitleBytes();
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- boolean hasWidth();
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- int getWidth();
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- boolean hasHeight();
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- int getHeight();
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- boolean hasSize();
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- serializers.protobuf.media.MediaContentHolder.Image.Size getSize();
- }
- /**
- * Protobuf type {@code serializers.protobuf.media.Image}
- */
- public static final class Image extends
- com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:serializers.protobuf.media.Image)
- ImageOrBuilder {
- // Use Image.newBuilder() to construct.
- private Image(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private Image(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
- private static final Image defaultInstance;
- public static Image getDefaultInstance() {
- return defaultInstance;
- }
- public Image getDefaultInstanceForType() {
- return defaultInstance;
- }
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Image(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- 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;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000001;
- uri_ = bs;
- break;
- }
- case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000002;
- title_ = bs;
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- width_ = input.readInt32();
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- height_ = input.readInt32();
- break;
- }
- case 40: {
- int rawValue = input.readEnum();
- serializers.protobuf.media.MediaContentHolder.Image.Size value = serializers.protobuf.media.MediaContentHolder.Image.Size.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(5, rawValue);
- } else {
- bitField0_ |= 0x00000010;
- size_ = value;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return serializers.protobuf.media.MediaContentHolder.internal_static_serializers_protobuf_media_Image_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return serializers.protobuf.media.MediaContentHolder.internal_static_serializers_protobuf_media_Image_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- serializers.protobuf.media.MediaContentHolder.Image.class, serializers.protobuf.media.MediaContentHolder.Image.Builder.class);
- }
- public static com.google.protobuf.Parser<Image> PARSER =
- new com.google.protobuf.AbstractParser<Image>() {
- public Image parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Image(input, extensionRegistry);
- }
- };
- @java.lang.Override
- public com.google.protobuf.Parser<Image> getParserForType() {
- return PARSER;
- }
- /**
- * Protobuf enum {@code serializers.protobuf.media.Image.Size}
- */
- public enum Size
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * <code>SMALL = 0;</code>
- */
- SMALL(0, 0),
- /**
- * <code>LARGE = 1;</code>
- */
- LARGE(1, 1),
- ;
- /**
- * <code>SMALL = 0;</code>
- */
- public static final int SMALL_VALUE = 0;
- /**
- * <code>LARGE = 1;</code>
- */
- public static final int LARGE_VALUE = 1;
- public final int getNumber() { return value; }
- public static Size valueOf(int value) {
- switch (value) {
- case 0: return SMALL;
- case 1: return LARGE;
- default: return null;
- }
- }
- public static com.google.protobuf.Internal.EnumLiteMap<Size>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Size>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Size>() {
- public Size findValueByNumber(int number) {
- return Size.valueOf(number);
- }
- };
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return serializers.protobuf.media.MediaContentHolder.Image.getDescriptor().getEnumTypes().get(0);
- }
- private static final Size[] VALUES = values();
- public static Size valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
- private final int index;
- private final int value;
- private Size(int index, int value) {
- this.index = index;
- this.value = value;
- }
- // @@protoc_insertion_point(enum_scope:serializers.protobuf.media.Image.Size)
- }
- private int bitField0_;
- public static final int URI_FIELD_NUMBER = 1;
- private java.lang.Object uri_;
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public boolean hasUri() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public java.lang.String getUri() {
- java.lang.Object ref = uri_;
- 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();
- if (bs.isValidUtf8()) {
- uri_ = s;
- }
- return s;
- }
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public com.google.protobuf.ByteString
- getUriBytes() {
- java.lang.Object ref = uri_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- uri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- public static final int TITLE_FIELD_NUMBER = 2;
- private java.lang.Object title_;
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public boolean hasTitle() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- 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();
- if (bs.isValidUtf8()) {
- title_ = s;
- }
- return s;
- }
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public com.google.protobuf.ByteString
- getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- public static final int WIDTH_FIELD_NUMBER = 3;
- private int width_;
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public boolean hasWidth() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public int getWidth() {
- return width_;
- }
- public static final int HEIGHT_FIELD_NUMBER = 4;
- private int height_;
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public boolean hasHeight() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public int getHeight() {
- return height_;
- }
- public static final int SIZE_FIELD_NUMBER = 5;
- private serializers.protobuf.media.MediaContentHolder.Image.Size size_;
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public boolean hasSize() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public serializers.protobuf.media.MediaContentHolder.Image.Size getSize() {
- return size_;
- }
- private void initFields() {
- uri_ = "";
- title_ = "";
- width_ = 0;
- height_ = 0;
- size_ = serializers.protobuf.media.MediaContentHolder.Image.Size.SMALL;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
- if (!hasUri()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasWidth()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasHeight()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasSize()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getUriBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getTitleBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeInt32(3, width_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeInt32(4, height_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- output.writeEnum(5, size_.getNumber());
- }
- getUnknownFields().writeTo(output);
- }
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getUriBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getTitleBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, width_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, height_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(5, size_.getNumber());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static serializers.protobuf.media.MediaContentHolder.Image parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(serializers.protobuf.media.MediaContentHolder.Image prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code serializers.protobuf.media.Image}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:serializers.protobuf.media.Image)
- serializers.protobuf.media.MediaContentHolder.ImageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return serializers.protobuf.media.MediaContentHolder.internal_static_serializers_protobuf_media_Image_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return serializers.protobuf.media.MediaContentHolder.internal_static_serializers_protobuf_media_Image_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- serializers.protobuf.media.MediaContentHolder.Image.class, serializers.protobuf.media.MediaContentHolder.Image.Builder.class);
- }
- // Construct using serializers.protobuf.media.MediaContentHolder.Image.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
- public Builder clear() {
- super.clear();
- uri_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- title_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- width_ = 0;
- bitField0_ = (bitField0_ & ~0x00000004);
- height_ = 0;
- bitField0_ = (bitField0_ & ~0x00000008);
- size_ = serializers.protobuf.media.MediaContentHolder.Image.Size.SMALL;
- bitField0_ = (bitField0_ & ~0x00000010);
- return this;
- }
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return serializers.protobuf.media.MediaContentHolder.internal_static_serializers_protobuf_media_Image_descriptor;
- }
- public serializers.protobuf.media.MediaContentHolder.Image getDefaultInstanceForType() {
- return serializers.protobuf.media.MediaContentHolder.Image.getDefaultInstance();
- }
- public serializers.protobuf.media.MediaContentHolder.Image build() {
- serializers.protobuf.media.MediaContentHolder.Image result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
- public serializers.protobuf.media.MediaContentHolder.Image buildPartial() {
- serializers.protobuf.media.MediaContentHolder.Image result = new serializers.protobuf.media.MediaContentHolder.Image(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.uri_ = uri_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.title_ = title_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.width_ = width_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.height_ = height_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000010;
- }
- result.size_ = size_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof serializers.protobuf.media.MediaContentHolder.Image) {
- return mergeFrom((serializers.protobuf.media.MediaContentHolder.Image)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
- public Builder mergeFrom(serializers.protobuf.media.MediaContentHolder.Image other) {
- if (other == serializers.protobuf.media.MediaContentHolder.Image.getDefaultInstance()) return this;
- if (other.hasUri()) {
- bitField0_ |= 0x00000001;
- uri_ = other.uri_;
- onChanged();
- }
- if (other.hasTitle()) {
- bitField0_ |= 0x00000002;
- title_ = other.title_;
- onChanged();
- }
- if (other.hasWidth()) {
- setWidth(other.getWidth());
- }
- if (other.hasHeight()) {
- setHeight(other.getHeight());
- }
- if (other.hasSize()) {
- setSize(other.getSize());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
- public final boolean isInitialized() {
- if (!hasUri()) {
- return false;
- }
- if (!hasWidth()) {
- return false;
- }
- if (!hasHeight()) {
- return false;
- }
- if (!hasSize()) {
- return false;
- }
- return true;
- }
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- serializers.protobuf.media.MediaContentHolder.Image parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (serializers.protobuf.media.MediaContentHolder.Image) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
- private java.lang.Object uri_ = "";
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public boolean hasUri() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public java.lang.String getUri() {
- java.lang.Object ref = uri_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- uri_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public com.google.protobuf.ByteString
- getUriBytes() {
- java.lang.Object ref = uri_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- uri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public Builder setUri(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- uri_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public Builder clearUri() {
- bitField0_ = (bitField0_ & ~0x00000001);
- uri_ = getDefaultInstance().getUri();
- onChanged();
- return this;
- }
- /**
- * <code>required string uri = 1;</code>
- *
- * <pre>
- *url to the thumbnail
- * </pre>
- */
- public Builder setUriBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- uri_ = value;
- onChanged();
- return this;
- }
- private java.lang.Object title_ = "";
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public boolean hasTitle() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- title_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public com.google.protobuf.ByteString
- getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public Builder setTitle(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- title_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public Builder clearTitle() {
- bitField0_ = (bitField0_ & ~0x00000002);
- title_ = getDefaultInstance().getTitle();
- onChanged();
- return this;
- }
- /**
- * <code>optional string title = 2;</code>
- *
- * <pre>
- *used in the html ALT
- * </pre>
- */
- public Builder setTitleBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- title_ = value;
- onChanged();
- return this;
- }
- private int width_ ;
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public boolean hasWidth() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public int getWidth() {
- return width_;
- }
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public Builder setWidth(int value) {
- bitField0_ |= 0x00000004;
- width_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required int32 width = 3;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public Builder clearWidth() {
- bitField0_ = (bitField0_ & ~0x00000004);
- width_ = 0;
- onChanged();
- return this;
- }
- private int height_ ;
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public boolean hasHeight() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public int getHeight() {
- return height_;
- }
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public Builder setHeight(int value) {
- bitField0_ |= 0x00000008;
- height_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required int32 height = 4;</code>
- *
- * <pre>
- * of the image
- * </pre>
- */
- public Builder clearHeight() {
- bitField0_ = (bitField0_ & ~0x00000008);
- height_ = 0;
- onChanged();
- return this;
- }
- private serializers.protobuf.media.MediaContentHolder.Image.Size size_ = serializers.protobuf.media.MediaContentHolder.Image.Size.SMALL;
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public boolean hasSize() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public serializers.protobuf.media.MediaContentHolder.Image.Size getSize() {
- return size_;
- }
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public Builder setSize(serializers.protobuf.media.MediaContentHolder.Image.Size value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- size_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required .serializers.protobuf.media.Image.Size size = 5;</code>
- *
- * <pre>
- * of the image (in relative terms, provided by cnbc for example)
- * </pre>
- */
- public Builder clearSize() {
- bitField0_ = (bitField0_ & ~0x00000010);
- size_ = serializers.protobuf.media.MediaContentHolder.Image.Size.SMALL;
- onChanged();
- return this;
- }
- // @@protoc_insertion_point(builder_scope:serializers.protobuf.media.Image)
- }
- static {
- defaultInstance = new Image(true);
- defaultInstance.initFields();
- }
- // @@protoc_insertion_point(class_scope:serializers.protobuf.media.Image)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement