/** * <code>optional .openxc.CommandResponse command_response = 6;</code> */ public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) { if (commandResponseBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && commandResponse_ != null && commandResponse_ != com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) { commandResponse_ = com.openxc.BinaryMessages.CommandResponse.newBuilder(commandResponse_).mergeFrom(value).buildPartial(); } else { commandResponse_ = value; } onChanged(); } else { commandResponseBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; } if (hasMessage()) { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getStatus()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
if (hasCommandResponse()) { result = result && getCommandResponse() .equals(other.getCommandResponse());
binaryMessage.getCommandResponse(); CommandType commandType; if(response.hasType()) { BinaryMessages.ControlCommand.Type serializedType = response.getType(); if(serializedType.equals(BinaryMessages.ControlCommand.Type.VERSION)) { commandType = CommandType.VERSION; throw new UnrecognizedMessageTypeException( "Unrecognized command type in response: " + response.getType()); if(!response.hasStatus()) { throw new UnrecognizedMessageTypeException( "Command response missing status"); if(response.hasMessage()) { message = response.getMessage(); return new CommandResponse(commandType, response.getStatus(), message);
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.openxc.BinaryMessages.CommandResponse)) { return super.equals(obj); } com.openxc.BinaryMessages.CommandResponse other = (com.openxc.BinaryMessages.CommandResponse) obj; boolean result = true; result = result && (hasType() == other.hasType()); if (hasType()) { result = result && type_ == other.type_; } result = result && (hasMessage() == other.hasMessage()); if (hasMessage()) { result = result && getMessage() .equals(other.getMessage()); } result = result && (hasStatus() == other.hasStatus()); if (hasStatus()) { result = result && (getStatus() == other.getStatus()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public com.openxc.BinaryMessages.CommandResponse buildPartial() { com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.message_ = message_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.status_ = status_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasMessage()) { bitField0_ |= 0x00000002; message_ = other.message_; onChanged(); } if (other.hasStatus()) { setStatus(other.getStatus()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() { return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance(); }
/** * <code>optional .openxc.CommandResponse command_response = 6;</code> */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { return commandResponse_ == null ? com.openxc.BinaryMessages.CommandResponse.getDefaultInstance() : commandResponse_; }
/** * <code>optional .openxc.CommandResponse command_response = 6;</code> */ public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() { if (commandResponseBuilder_ != null) { return commandResponseBuilder_.getMessageOrBuilder(); } else { return commandResponse_ == null ? com.openxc.BinaryMessages.CommandResponse.getDefaultInstance() : commandResponse_; } } /**
/** * <code>optional .openxc.CommandResponse command_response = 6;</code> */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { return commandResponse_ == null ? com.openxc.BinaryMessages.CommandResponse.getDefaultInstance() : commandResponse_; } /**
/** * <code>optional string message = 2;</code> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /**
/** * <code>optional .openxc.CommandResponse command_response = 6;</code> */ public com.openxc.BinaryMessages.CommandResponse getCommandResponse() { if (commandResponseBuilder_ == null) { return commandResponse_ == null ? com.openxc.BinaryMessages.CommandResponse.getDefaultInstance() : commandResponse_; } else { return commandResponseBuilder_.getMessage(); } } /**