// Path: core/src/main/java/fixio/fixprotocol/fields/DateTimeFormatterWrapper.java
// public class DateTimeFormatterWrapper {
//     private final String pattern;
//     private final ZoneId zoneId;
//     private final DateTimeFormatter dateTimeFormatter;
//     private final String padding;
//     private final int paddingLen;
// 
//     public DateTimeFormatterWrapper(String pattern, ZoneId zoneId) {
//         this.pattern = pattern;
//         this.zoneId = zoneId;
//         int idx = pattern.indexOf('\'');
//         if (idx > 0) {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern.substring(0, idx)).withZone(zoneId);
//             this.padding = pattern.substring(idx).replaceAll("'", "");
//         } else {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern).withZone(zoneId);
//             this.padding = "";
//         }
//         this.paddingLen = this.padding.length();
//     }
// 
//     public String getPattern() {
//         return pattern;
//     }
// 
//     public ZoneId getZoneId() {
//         return zoneId;
//     }
// 
//     public DateTimeFormatter getDateTimeFormatter() {
//         return dateTimeFormatter;
//     }
// 
//     public String getPadding() {
//         return padding;
//     }
// 
// 
//     public String format(TemporalAccessor value) {
//         return dateTimeFormatter.format(value) + padding;
//     }
// 
//     public LocalDate parseLocalDate(String timestampString) {
//         return LocalDate.parse(timestampString, dateTimeFormatter);
//     }
// 
//     public LocalTime parseLocalTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return LocalTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return LocalTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// 
//     public ZonedDateTime parseZonedDateTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return ZonedDateTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return ZonedDateTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// }


import fixio.fixprotocol.fields.DateTimeFormatterWrapper;
import java.time.ZonedDateTime;
import java.util.List;
/*
 * Copyright 2014 The FIX.io Project
 *
 * The FIX.io Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package fixio.fixprotocol;



public class FixMessageHeader {

    private String beginString;
    private String messageType;
    private int msgSeqNum;
    private ZonedDateTime sendingTime;
    private String senderCompID;
    private String senderSubID;
    private String senderLocationID;
    private String targetCompID;
    private String targetSubID;
    private String targetLocationID;
    private List<FixMessageFragment> customFields;
// Path: core/src/main/java/fixio/fixprotocol/fields/DateTimeFormatterWrapper.java
// public class DateTimeFormatterWrapper {
//     private final String pattern;
//     private final ZoneId zoneId;
//     private final DateTimeFormatter dateTimeFormatter;
//     private final String padding;
//     private final int paddingLen;
// 
//     public DateTimeFormatterWrapper(String pattern, ZoneId zoneId) {
//         this.pattern = pattern;
//         this.zoneId = zoneId;
//         int idx = pattern.indexOf('\'');
//         if (idx > 0) {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern.substring(0, idx)).withZone(zoneId);
//             this.padding = pattern.substring(idx).replaceAll("'", "");
//         } else {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern).withZone(zoneId);
//             this.padding = "";
//         }
//         this.paddingLen = this.padding.length();
//     }
// 
//     public String getPattern() {
//         return pattern;
//     }
// 
//     public ZoneId getZoneId() {
//         return zoneId;
//     }
// 
//     public DateTimeFormatter getDateTimeFormatter() {
//         return dateTimeFormatter;
//     }
// 
//     public String getPadding() {
//         return padding;
//     }
// 
// 
//     public String format(TemporalAccessor value) {
//         return dateTimeFormatter.format(value) + padding;
//     }
// 
//     public LocalDate parseLocalDate(String timestampString) {
//         return LocalDate.parse(timestampString, dateTimeFormatter);
//     }
// 
//     public LocalTime parseLocalTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return LocalTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return LocalTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// 
//     public ZonedDateTime parseZonedDateTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return ZonedDateTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return ZonedDateTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// }


// Path: core/src/main/java/fixio/fixprotocol/FixMessageHeader.java
import fixio.fixprotocol.fields.DateTimeFormatterWrapper;
import java.time.ZonedDateTime;
import java.util.List;

/*
 * Copyright 2014 The FIX.io Project
 *
 * The FIX.io Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package fixio.fixprotocol;



public class FixMessageHeader {

    private String beginString;
    private String messageType;
    private int msgSeqNum;
    private ZonedDateTime sendingTime;
    private String senderCompID;
    private String senderSubID;
    private String senderLocationID;
    private String targetCompID;
    private String targetSubID;
    private String targetLocationID;
    private List<FixMessageFragment> customFields;
    private DateTimeFormatterWrapper dateTimeFormatter = null;