/** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Sentiment valueOf(int value) { return forNumber(value); }
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public com.example.grpc.Sentiment getSentiment() { com.example.grpc.Sentiment result = com.example.grpc.Sentiment.valueOf(sentiment_); return result == null ? com.example.grpc.Sentiment.UNRECOGNIZED : result; }
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public Builder setSentiment(com.example.grpc.Sentiment value) { if (value == null) { throw new NullPointerException(); } sentiment_ = value.getNumber(); onChanged(); return this; } /**
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public Builder setSentiment(com.example.grpc.Sentiment value) { if (value == null) { throw new NullPointerException(); } sentiment_ = value.getNumber(); onChanged(); return this; } /**
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public Builder setSentiment(com.example.grpc.Sentiment value) { if (value == null) { throw new NullPointerException(); } sentiment_ = value.getNumber(); onChanged(); return this; } /**
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public com.example.grpc.Sentiment getSentiment() { com.example.grpc.Sentiment result = com.example.grpc.Sentiment.valueOf(sentiment_); return result == null ? com.example.grpc.Sentiment.UNRECOGNIZED : result; } /**
/** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Sentiment valueOf(int value) { return forNumber(value); }
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (age_ != 0L) { output.writeInt64(2, age_); } for (int i = 0; i < hobbies_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, hobbies_.getRaw(i)); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetBagOfTricks(), BagOfTricksDefaultEntryHolder.defaultEntry, 4); if (sentiment_ != com.example.grpc.Sentiment.HAPPY.getNumber()) { output.writeEnum(5, sentiment_); } unknownFields.writeTo(output); }
public static Sentiment valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; }
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public com.example.grpc.Sentiment getSentiment() { com.example.grpc.Sentiment result = com.example.grpc.Sentiment.valueOf(sentiment_); return result == null ? com.example.grpc.Sentiment.UNRECOGNIZED : result; } /**
/** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Sentiment valueOf(int value) { return forNumber(value); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (age_ != 0) { output.writeInt32(2, age_); } for (int i = 0; i < hobbies_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, hobbies_.getRaw(i)); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetBagOfTricks(), BagOfTricksDefaultEntryHolder.defaultEntry, 4); if (sentiment_ != com.example.grpc.Sentiment.HAPPY.getNumber()) { output.writeEnum(5, sentiment_); } unknownFields.writeTo(output); }
public static Sentiment valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; }
/** * <code>.com.example.grpc.Sentiment sentiment = 5;</code> */ public com.example.grpc.Sentiment getSentiment() { com.example.grpc.Sentiment result = com.example.grpc.Sentiment.valueOf(sentiment_); return result == null ? com.example.grpc.Sentiment.UNRECOGNIZED : result; }