// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: ordercenter.proto

package com.ywt.gapi.ordercenter;

/**
 * <pre>
 *退款请求消息
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.ordercenter.RefundRequest}
 */
public  final class RefundRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.ordercenter.RefundRequest)
    RefundRequestOrBuilder {
  // Use RefundRequest.newBuilder() to construct.
  private RefundRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private RefundRequest() {
    orderNo_ = "";
    orderId_ = 0;
    amount_ = 0;
    opBy_ = "";
    refundType_ = 0;
    refundNotifyMethod_ = "";
    refundNotifyRestUrl_ = "";
    remark_ = "";
    custom_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private RefundRequest(
      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();

            orderNo_ = s;
            break;
          }
          case 16: {

            orderId_ = input.readInt32();
            break;
          }
          case 24: {

            amount_ = input.readInt32();
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            opBy_ = s;
            break;
          }
          case 40: {

            refundType_ = input.readInt32();
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            refundNotifyMethod_ = s;
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            refundNotifyRestUrl_ = s;
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();

            remark_ = s;
            break;
          }
          case 74: {
            java.lang.String s = input.readStringRequireUtf8();

            custom_ = s;
            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.ywt.gapi.ordercenter.Ordercenter.internal_static_com_ywt_gapi_ordercenter_RefundRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.ordercenter.Ordercenter.internal_static_com_ywt_gapi_ordercenter_RefundRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.ordercenter.RefundRequest.class, com.ywt.gapi.ordercenter.RefundRequest.Builder.class);
  }

  public static final int ORDERNO_FIELD_NUMBER = 1;
  private volatile java.lang.Object orderNo_;
  /**
   * <pre>
   *订单编号
   * </pre>
   *
   * <code>string orderNo = 1;</code>
   */
  public java.lang.String getOrderNo() {
    java.lang.Object ref = orderNo_;
    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();
      orderNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *订单编号
   * </pre>
   *
   * <code>string orderNo = 1;</code>
   */
  public com.google.protobuf.ByteString
      getOrderNoBytes() {
    java.lang.Object ref = orderNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      orderNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ORDERID_FIELD_NUMBER = 2;
  private int orderId_;
  /**
   * <pre>
   *订单号
   * </pre>
   *
   * <code>int32 orderId = 2;</code>
   */
  public int getOrderId() {
    return orderId_;
  }

  public static final int AMOUNT_FIELD_NUMBER = 3;
  private int amount_;
  /**
   * <pre>
   *退款金额(单位：分), 当为0时，默认该订单总金额
   * </pre>
   *
   * <code>int32 amount = 3;</code>
   */
  public int getAmount() {
    return amount_;
  }

  public static final int OPBY_FIELD_NUMBER = 4;
  private volatile java.lang.Object opBy_;
  /**
   * <pre>
   *操作人, 当人工退款方式时必填
   * </pre>
   *
   * <code>string opBy = 4;</code>
   */
  public java.lang.String getOpBy() {
    java.lang.Object ref = opBy_;
    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();
      opBy_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *操作人, 当人工退款方式时必填
   * </pre>
   *
   * <code>string opBy = 4;</code>
   */
  public com.google.protobuf.ByteString
      getOpByBytes() {
    java.lang.Object ref = opBy_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      opBy_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REFUNDTYPE_FIELD_NUMBER = 5;
  private int refundType_;
  /**
   * <pre>
   *退款方式，1: 人工, 2: 系统
   * </pre>
   *
   * <code>int32 refundType = 5;</code>
   */
  public int getRefundType() {
    return refundType_;
  }

  public static final int REFUNDNOTIFYMETHOD_FIELD_NUMBER = 6;
  private volatile java.lang.Object refundNotifyMethod_;
  /**
   * <pre>
   *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
   * </pre>
   *
   * <code>string refundNotifyMethod = 6;</code>
   */
  public java.lang.String getRefundNotifyMethod() {
    java.lang.Object ref = refundNotifyMethod_;
    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();
      refundNotifyMethod_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
   * </pre>
   *
   * <code>string refundNotifyMethod = 6;</code>
   */
  public com.google.protobuf.ByteString
      getRefundNotifyMethodBytes() {
    java.lang.Object ref = refundNotifyMethod_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      refundNotifyMethod_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REFUNDNOTIFYRESTURL_FIELD_NUMBER = 7;
  private volatile java.lang.Object refundNotifyRestUrl_;
  /**
   * <pre>
   *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
   * </pre>
   *
   * <code>string refundNotifyRestUrl = 7;</code>
   */
  public java.lang.String getRefundNotifyRestUrl() {
    java.lang.Object ref = refundNotifyRestUrl_;
    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();
      refundNotifyRestUrl_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
   * </pre>
   *
   * <code>string refundNotifyRestUrl = 7;</code>
   */
  public com.google.protobuf.ByteString
      getRefundNotifyRestUrlBytes() {
    java.lang.Object ref = refundNotifyRestUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      refundNotifyRestUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REMARK_FIELD_NUMBER = 8;
  private volatile java.lang.Object remark_;
  /**
   * <code>string remark = 8;</code>
   */
  public java.lang.String getRemark() {
    java.lang.Object ref = remark_;
    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();
      remark_ = s;
      return s;
    }
  }
  /**
   * <code>string remark = 8;</code>
   */
  public com.google.protobuf.ByteString
      getRemarkBytes() {
    java.lang.Object ref = remark_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      remark_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CUSTOM_FIELD_NUMBER = 9;
  private volatile java.lang.Object custom_;
  /**
   * <pre>
   *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
   * </pre>
   *
   * <code>string custom = 9;</code>
   */
  public java.lang.String getCustom() {
    java.lang.Object ref = custom_;
    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();
      custom_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
   * </pre>
   *
   * <code>string custom = 9;</code>
   */
  public com.google.protobuf.ByteString
      getCustomBytes() {
    java.lang.Object ref = custom_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      custom_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (!getOrderNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, orderNo_);
    }
    if (orderId_ != 0) {
      output.writeInt32(2, orderId_);
    }
    if (amount_ != 0) {
      output.writeInt32(3, amount_);
    }
    if (!getOpByBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, opBy_);
    }
    if (refundType_ != 0) {
      output.writeInt32(5, refundType_);
    }
    if (!getRefundNotifyMethodBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, refundNotifyMethod_);
    }
    if (!getRefundNotifyRestUrlBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, refundNotifyRestUrl_);
    }
    if (!getRemarkBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, remark_);
    }
    if (!getCustomBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, custom_);
    }
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getOrderNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, orderNo_);
    }
    if (orderId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, orderId_);
    }
    if (amount_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, amount_);
    }
    if (!getOpByBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, opBy_);
    }
    if (refundType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, refundType_);
    }
    if (!getRefundNotifyMethodBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, refundNotifyMethod_);
    }
    if (!getRefundNotifyRestUrlBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, refundNotifyRestUrl_);
    }
    if (!getRemarkBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, remark_);
    }
    if (!getCustomBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, custom_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.ordercenter.RefundRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.ordercenter.RefundRequest other = (com.ywt.gapi.ordercenter.RefundRequest) obj;

    boolean result = true;
    result = result && getOrderNo()
        .equals(other.getOrderNo());
    result = result && (getOrderId()
        == other.getOrderId());
    result = result && (getAmount()
        == other.getAmount());
    result = result && getOpBy()
        .equals(other.getOpBy());
    result = result && (getRefundType()
        == other.getRefundType());
    result = result && getRefundNotifyMethod()
        .equals(other.getRefundNotifyMethod());
    result = result && getRefundNotifyRestUrl()
        .equals(other.getRefundNotifyRestUrl());
    result = result && getRemark()
        .equals(other.getRemark());
    result = result && getCustom()
        .equals(other.getCustom());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ORDERNO_FIELD_NUMBER;
    hash = (53 * hash) + getOrderNo().hashCode();
    hash = (37 * hash) + ORDERID_FIELD_NUMBER;
    hash = (53 * hash) + getOrderId();
    hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
    hash = (53 * hash) + getAmount();
    hash = (37 * hash) + OPBY_FIELD_NUMBER;
    hash = (53 * hash) + getOpBy().hashCode();
    hash = (37 * hash) + REFUNDTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getRefundType();
    hash = (37 * hash) + REFUNDNOTIFYMETHOD_FIELD_NUMBER;
    hash = (53 * hash) + getRefundNotifyMethod().hashCode();
    hash = (37 * hash) + REFUNDNOTIFYRESTURL_FIELD_NUMBER;
    hash = (53 * hash) + getRefundNotifyRestUrl().hashCode();
    hash = (37 * hash) + REMARK_FIELD_NUMBER;
    hash = (53 * hash) + getRemark().hashCode();
    hash = (37 * hash) + CUSTOM_FIELD_NUMBER;
    hash = (53 * hash) + getCustom().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.ordercenter.RefundRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.ordercenter.RefundRequest 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.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *退款请求消息
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.ordercenter.RefundRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.ordercenter.RefundRequest)
      com.ywt.gapi.ordercenter.RefundRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.ordercenter.Ordercenter.internal_static_com_ywt_gapi_ordercenter_RefundRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.ordercenter.Ordercenter.internal_static_com_ywt_gapi_ordercenter_RefundRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.ordercenter.RefundRequest.class, com.ywt.gapi.ordercenter.RefundRequest.Builder.class);
    }

    // Construct using com.ywt.gapi.ordercenter.RefundRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      orderNo_ = "";

      orderId_ = 0;

      amount_ = 0;

      opBy_ = "";

      refundType_ = 0;

      refundNotifyMethod_ = "";

      refundNotifyRestUrl_ = "";

      remark_ = "";

      custom_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.ordercenter.Ordercenter.internal_static_com_ywt_gapi_ordercenter_RefundRequest_descriptor;
    }

    public com.ywt.gapi.ordercenter.RefundRequest getDefaultInstanceForType() {
      return com.ywt.gapi.ordercenter.RefundRequest.getDefaultInstance();
    }

    public com.ywt.gapi.ordercenter.RefundRequest build() {
      com.ywt.gapi.ordercenter.RefundRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.ywt.gapi.ordercenter.RefundRequest buildPartial() {
      com.ywt.gapi.ordercenter.RefundRequest result = new com.ywt.gapi.ordercenter.RefundRequest(this);
      result.orderNo_ = orderNo_;
      result.orderId_ = orderId_;
      result.amount_ = amount_;
      result.opBy_ = opBy_;
      result.refundType_ = refundType_;
      result.refundNotifyMethod_ = refundNotifyMethod_;
      result.refundNotifyRestUrl_ = refundNotifyRestUrl_;
      result.remark_ = remark_;
      result.custom_ = custom_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.ywt.gapi.ordercenter.RefundRequest) {
        return mergeFrom((com.ywt.gapi.ordercenter.RefundRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.ordercenter.RefundRequest other) {
      if (other == com.ywt.gapi.ordercenter.RefundRequest.getDefaultInstance()) return this;
      if (!other.getOrderNo().isEmpty()) {
        orderNo_ = other.orderNo_;
        onChanged();
      }
      if (other.getOrderId() != 0) {
        setOrderId(other.getOrderId());
      }
      if (other.getAmount() != 0) {
        setAmount(other.getAmount());
      }
      if (!other.getOpBy().isEmpty()) {
        opBy_ = other.opBy_;
        onChanged();
      }
      if (other.getRefundType() != 0) {
        setRefundType(other.getRefundType());
      }
      if (!other.getRefundNotifyMethod().isEmpty()) {
        refundNotifyMethod_ = other.refundNotifyMethod_;
        onChanged();
      }
      if (!other.getRefundNotifyRestUrl().isEmpty()) {
        refundNotifyRestUrl_ = other.refundNotifyRestUrl_;
        onChanged();
      }
      if (!other.getRemark().isEmpty()) {
        remark_ = other.remark_;
        onChanged();
      }
      if (!other.getCustom().isEmpty()) {
        custom_ = other.custom_;
        onChanged();
      }
      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.ywt.gapi.ordercenter.RefundRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.ordercenter.RefundRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object orderNo_ = "";
    /**
     * <pre>
     *订单编号
     * </pre>
     *
     * <code>string orderNo = 1;</code>
     */
    public java.lang.String getOrderNo() {
      java.lang.Object ref = orderNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        orderNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *订单编号
     * </pre>
     *
     * <code>string orderNo = 1;</code>
     */
    public com.google.protobuf.ByteString
        getOrderNoBytes() {
      java.lang.Object ref = orderNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        orderNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *订单编号
     * </pre>
     *
     * <code>string orderNo = 1;</code>
     */
    public Builder setOrderNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      orderNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *订单编号
     * </pre>
     *
     * <code>string orderNo = 1;</code>
     */
    public Builder clearOrderNo() {
      
      orderNo_ = getDefaultInstance().getOrderNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *订单编号
     * </pre>
     *
     * <code>string orderNo = 1;</code>
     */
    public Builder setOrderNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      orderNo_ = value;
      onChanged();
      return this;
    }

    private int orderId_ ;
    /**
     * <pre>
     *订单号
     * </pre>
     *
     * <code>int32 orderId = 2;</code>
     */
    public int getOrderId() {
      return orderId_;
    }
    /**
     * <pre>
     *订单号
     * </pre>
     *
     * <code>int32 orderId = 2;</code>
     */
    public Builder setOrderId(int value) {
      
      orderId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *订单号
     * </pre>
     *
     * <code>int32 orderId = 2;</code>
     */
    public Builder clearOrderId() {
      
      orderId_ = 0;
      onChanged();
      return this;
    }

    private int amount_ ;
    /**
     * <pre>
     *退款金额(单位：分), 当为0时，默认该订单总金额
     * </pre>
     *
     * <code>int32 amount = 3;</code>
     */
    public int getAmount() {
      return amount_;
    }
    /**
     * <pre>
     *退款金额(单位：分), 当为0时，默认该订单总金额
     * </pre>
     *
     * <code>int32 amount = 3;</code>
     */
    public Builder setAmount(int value) {
      
      amount_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款金额(单位：分), 当为0时，默认该订单总金额
     * </pre>
     *
     * <code>int32 amount = 3;</code>
     */
    public Builder clearAmount() {
      
      amount_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object opBy_ = "";
    /**
     * <pre>
     *操作人, 当人工退款方式时必填
     * </pre>
     *
     * <code>string opBy = 4;</code>
     */
    public java.lang.String getOpBy() {
      java.lang.Object ref = opBy_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        opBy_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *操作人, 当人工退款方式时必填
     * </pre>
     *
     * <code>string opBy = 4;</code>
     */
    public com.google.protobuf.ByteString
        getOpByBytes() {
      java.lang.Object ref = opBy_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        opBy_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *操作人, 当人工退款方式时必填
     * </pre>
     *
     * <code>string opBy = 4;</code>
     */
    public Builder setOpBy(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      opBy_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *操作人, 当人工退款方式时必填
     * </pre>
     *
     * <code>string opBy = 4;</code>
     */
    public Builder clearOpBy() {
      
      opBy_ = getDefaultInstance().getOpBy();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *操作人, 当人工退款方式时必填
     * </pre>
     *
     * <code>string opBy = 4;</code>
     */
    public Builder setOpByBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      opBy_ = value;
      onChanged();
      return this;
    }

    private int refundType_ ;
    /**
     * <pre>
     *退款方式，1: 人工, 2: 系统
     * </pre>
     *
     * <code>int32 refundType = 5;</code>
     */
    public int getRefundType() {
      return refundType_;
    }
    /**
     * <pre>
     *退款方式，1: 人工, 2: 系统
     * </pre>
     *
     * <code>int32 refundType = 5;</code>
     */
    public Builder setRefundType(int value) {
      
      refundType_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款方式，1: 人工, 2: 系统
     * </pre>
     *
     * <code>int32 refundType = 5;</code>
     */
    public Builder clearRefundType() {
      
      refundType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object refundNotifyMethod_ = "";
    /**
     * <pre>
     *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
     * </pre>
     *
     * <code>string refundNotifyMethod = 6;</code>
     */
    public java.lang.String getRefundNotifyMethod() {
      java.lang.Object ref = refundNotifyMethod_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        refundNotifyMethod_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
     * </pre>
     *
     * <code>string refundNotifyMethod = 6;</code>
     */
    public com.google.protobuf.ByteString
        getRefundNotifyMethodBytes() {
      java.lang.Object ref = refundNotifyMethod_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        refundNotifyMethod_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
     * </pre>
     *
     * <code>string refundNotifyMethod = 6;</code>
     */
    public Builder setRefundNotifyMethod(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      refundNotifyMethod_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
     * </pre>
     *
     * <code>string refundNotifyMethod = 6;</code>
     */
    public Builder clearRefundNotifyMethod() {
      
      refundNotifyMethod_ = getDefaultInstance().getRefundNotifyMethod();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款成功后回调grpc方法，结构：(/${package}.${service}/${method})，如：/com.ywt.gapi.mq.MQExecutorService/executeGRPC
     * </pre>
     *
     * <code>string refundNotifyMethod = 6;</code>
     */
    public Builder setRefundNotifyMethodBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      refundNotifyMethod_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object refundNotifyRestUrl_ = "";
    /**
     * <pre>
     *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
     * </pre>
     *
     * <code>string refundNotifyRestUrl = 7;</code>
     */
    public java.lang.String getRefundNotifyRestUrl() {
      java.lang.Object ref = refundNotifyRestUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        refundNotifyRestUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
     * </pre>
     *
     * <code>string refundNotifyRestUrl = 7;</code>
     */
    public com.google.protobuf.ByteString
        getRefundNotifyRestUrlBytes() {
      java.lang.Object ref = refundNotifyRestUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        refundNotifyRestUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
     * </pre>
     *
     * <code>string refundNotifyRestUrl = 7;</code>
     */
    public Builder setRefundNotifyRestUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      refundNotifyRestUrl_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
     * </pre>
     *
     * <code>string refundNotifyRestUrl = 7;</code>
     */
    public Builder clearRefundNotifyRestUrl() {
      
      refundNotifyRestUrl_ = getDefaultInstance().getRefundNotifyRestUrl();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *退款成功后回调rest服务方法，url格式: rest://com.ywt.MgDrugApiService/path1/path2
     * </pre>
     *
     * <code>string refundNotifyRestUrl = 7;</code>
     */
    public Builder setRefundNotifyRestUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      refundNotifyRestUrl_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object remark_ = "";
    /**
     * <code>string remark = 8;</code>
     */
    public java.lang.String getRemark() {
      java.lang.Object ref = remark_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        remark_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string remark = 8;</code>
     */
    public com.google.protobuf.ByteString
        getRemarkBytes() {
      java.lang.Object ref = remark_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        remark_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string remark = 8;</code>
     */
    public Builder setRemark(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      remark_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string remark = 8;</code>
     */
    public Builder clearRemark() {
      
      remark_ = getDefaultInstance().getRemark();
      onChanged();
      return this;
    }
    /**
     * <code>string remark = 8;</code>
     */
    public Builder setRemarkBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      remark_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object custom_ = "";
    /**
     * <pre>
     *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
     * </pre>
     *
     * <code>string custom = 9;</code>
     */
    public java.lang.String getCustom() {
      java.lang.Object ref = custom_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        custom_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
     * </pre>
     *
     * <code>string custom = 9;</code>
     */
    public com.google.protobuf.ByteString
        getCustomBytes() {
      java.lang.Object ref = custom_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        custom_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
     * </pre>
     *
     * <code>string custom = 9;</code>
     */
    public Builder setCustom(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      custom_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
     * </pre>
     *
     * <code>string custom = 9;</code>
     */
    public Builder clearCustom() {
      
      custom_ = getDefaultInstance().getCustom();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *本次操作自定义数据，【订单退款成功通知】会通过 custom 回发
     * </pre>
     *
     * <code>string custom = 9;</code>
     */
    public Builder setCustomBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      custom_ = value;
      onChanged();
      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:com.ywt.gapi.ordercenter.RefundRequest)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.ordercenter.RefundRequest)
  private static final com.ywt.gapi.ordercenter.RefundRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ywt.gapi.ordercenter.RefundRequest();
  }

  public static com.ywt.gapi.ordercenter.RefundRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<RefundRequest>
      PARSER = new com.google.protobuf.AbstractParser<RefundRequest>() {
    public RefundRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new RefundRequest(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<RefundRequest> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<RefundRequest> getParserForType() {
    return PARSER;
  }

  public com.ywt.gapi.ordercenter.RefundRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

