public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() { com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (requestBuilder_ == null) { result.request_ = request_; } else { result.request_ = requestBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.action_ = action_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code> */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { if (diagnosticRequestBuilder_ != null) { return diagnosticRequestBuilder_.getMessageOrBuilder(); } else { return diagnosticRequest_ == null ? com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance() : diagnosticRequest_; } } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasRequest()) { hash = (37 * hash) + REQUEST_FIELD_NUMBER; hash = (53 * hash) + getRequest().hashCode(); } if (hasAction()) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + action_; } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
if (hasDiagnosticRequest()) { result = result && getDiagnosticRequest() .equals(other.getDiagnosticRequest());
command.getDiagnosticRequest(); String action; if(!diagnosticCommand.hasAction()) { throw new UnrecognizedMessageTypeException( "Diagnostic command missing action"); } else if(diagnosticCommand.getAction() == BinaryMessages.DiagnosticControlCommand.Action.ADD) { action = DiagnosticRequest.ADD_ACTION_KEY; } else if(diagnosticCommand.getAction() == BinaryMessages.DiagnosticControlCommand.Action.CANCEL) { action = DiagnosticRequest.CANCEL_ACTION_KEY; } else { throw new UnrecognizedMessageTypeException( "Unrecognized action: " + diagnosticCommand.getAction()); diagnosticCommand.getRequest(); DiagnosticRequest request = new DiagnosticRequest( serializedRequest.getBus(),
hash = (53 * hash) + getDiagnosticRequest().hashCode();
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.openxc.BinaryMessages.DiagnosticControlCommand)) { return super.equals(obj); } com.openxc.BinaryMessages.DiagnosticControlCommand other = (com.openxc.BinaryMessages.DiagnosticControlCommand) obj; boolean result = true; result = result && (hasRequest() == other.hasRequest()); if (hasRequest()) { result = result && getRequest() .equals(other.getRequest()); } result = result && (hasAction() == other.hasAction()); if (hasAction()) { result = result && action_ == other.action_; } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code> */ public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) { if (diagnosticRequestBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && diagnosticRequest_ != null && diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) { diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial(); } else { diagnosticRequest_ = value; } onChanged(); } else { diagnosticRequestBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getRequest()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, action_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance(); }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0); }
/** * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code> */ public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() { return diagnosticRequest_ == null ? com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance() : diagnosticRequest_; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, getRequest()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, action_); } unknownFields.writeTo(output); }
/** * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code> */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { return diagnosticRequest_ == null ? com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance() : diagnosticRequest_; } /**
public com.openxc.BinaryMessages.DiagnosticControlCommand build() { com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code> */ public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() { if (diagnosticRequestBuilder_ == null) { return diagnosticRequest_ == null ? com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance() : diagnosticRequest_; } else { return diagnosticRequestBuilder_.getMessage(); } } /**
public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) { if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this; if (other.hasRequest()) { mergeRequest(other.getRequest()); } if (other.hasAction()) { setAction(other.getAction()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }