com.exactpro.sf.messages.testaml.BasicHeader Maven / Gradle / Ivy
/******************************************************************************
* Copyright 2009-2018 Exactpro (Exactpro Systems Limited)
*
* Licensed 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 com.exactpro.sf.messages.testaml;
import com.exactpro.sf.common.impl.messages.DefaultMessageFactory;
import com.exactpro.sf.common.impl.messages.BaseMessage;
import com.exactpro.sf.common.messages.IMessageFactory;
import com.exactpro.sf.common.messages.IMessage;
import com.exactpro.sf.common.messages.FieldNotFoundException;
import com.exactpro.sf.aml.scriptutil.StaticUtil.IFilter;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.lang.Deprecated;
@SuppressWarnings("unused")
public class BasicHeader extends BaseMessage
{
public static final String MESSAGE_NAME = "BasicHeader";
public BasicHeader(IMessageFactory messageFactory)
{
this(messageFactory.createMessage(MESSAGE_NAME, (messageFactory.getNamespace() == null) ? "TestAML" : messageFactory.getNamespace()));
}
/**
* @deprecated Please use {@link #BasicHeader(IMessageFactory)}
*/
@Deprecated
public BasicHeader()
{
this(DefaultMessageFactory.getFactory());
}
/**
* @deprecated Please use {@link #BasicHeader(IMessageFactory)}
*/
@Deprecated
public BasicHeader(String name, String namespace)
{
super(DefaultMessageFactory.getFactory().createMessage(name, namespace));
}
public BasicHeader(IMessage msg)
{
super(msg);
}
@Override
public BasicHeader clone() {
return (BasicHeader)super.clone();
}
public BasicHeader setApplicationID(String value)
{
this.msg.addField("ApplicationID", value);
return this;
}
public String getApplicationID()
{
Object value = this.msg.getField("ApplicationID");
return (String)value;
}
public Object getUntypedApplicationID()
{
return this.msg.getField("ApplicationID");
}
public IFilter getApplicationIDFilter()
{
return this.msg.getField("ApplicationID");
}
public BasicHeader setApplicationIDFilter(IFilter filter)
{
this.msg.addField("ApplicationID", filter);
return this;
}
public BasicHeader removeApplicationID()
{
this.msg.removeField("ApplicationID");
return this;
}
public boolean isSetApplicationID()
{
return this.msg.getField("ApplicationID") != null;
}
public boolean isFilterApplicationID()
{
return this.msg.getField("ApplicationID") instanceof IFilter;
}
public BasicHeader setServiceID(int value)
{
this.msg.addField("ServiceID", value);
return this;
}
public int getServiceID()
{
Object value = this.msg.getField("ServiceID");
if(value == null)
{
throw new FieldNotFoundException(" ServiceID ");
}
return (Integer)value;
}
public Object getUntypedServiceID()
{
return this.msg.getField("ServiceID");
}
public IFilter getServiceIDFilter()
{
return this.msg.getField("ServiceID");
}
public BasicHeader setServiceIDFilter(IFilter filter)
{
this.msg.addField("ServiceID", filter);
return this;
}
public BasicHeader removeServiceID()
{
this.msg.removeField("ServiceID");
return this;
}
public boolean isSetServiceID()
{
return this.msg.getField("ServiceID") != null;
}
public boolean isFilterServiceID()
{
return this.msg.getField("ServiceID") instanceof IFilter;
}
public BasicHeader setLogicalTerminalAddress(String value)
{
this.msg.addField("LogicalTerminalAddress", value);
return this;
}
public String getLogicalTerminalAddress()
{
Object value = this.msg.getField("LogicalTerminalAddress");
return (String)value;
}
public Object getUntypedLogicalTerminalAddress()
{
return this.msg.getField("LogicalTerminalAddress");
}
public IFilter getLogicalTerminalAddressFilter()
{
return this.msg.getField("LogicalTerminalAddress");
}
public BasicHeader setLogicalTerminalAddressFilter(IFilter filter)
{
this.msg.addField("LogicalTerminalAddress", filter);
return this;
}
public BasicHeader removeLogicalTerminalAddress()
{
this.msg.removeField("LogicalTerminalAddress");
return this;
}
public boolean isSetLogicalTerminalAddress()
{
return this.msg.getField("LogicalTerminalAddress") != null;
}
public boolean isFilterLogicalTerminalAddress()
{
return this.msg.getField("LogicalTerminalAddress") instanceof IFilter;
}
public BasicHeader setSessionNumber(int value)
{
this.msg.addField("SessionNumber", value);
return this;
}
public int getSessionNumber()
{
Object value = this.msg.getField("SessionNumber");
if(value == null)
{
throw new FieldNotFoundException(" SessionNumber ");
}
return (Integer)value;
}
public Object getUntypedSessionNumber()
{
return this.msg.getField("SessionNumber");
}
public IFilter getSessionNumberFilter()
{
return this.msg.getField("SessionNumber");
}
public BasicHeader setSessionNumberFilter(IFilter filter)
{
this.msg.addField("SessionNumber", filter);
return this;
}
public BasicHeader removeSessionNumber()
{
this.msg.removeField("SessionNumber");
return this;
}
public boolean isSetSessionNumber()
{
return this.msg.getField("SessionNumber") != null;
}
public boolean isFilterSessionNumber()
{
return this.msg.getField("SessionNumber") instanceof IFilter;
}
public BasicHeader setSequenceNumber(int value)
{
this.msg.addField("SequenceNumber", value);
return this;
}
public int getSequenceNumber()
{
Object value = this.msg.getField("SequenceNumber");
if(value == null)
{
throw new FieldNotFoundException(" SequenceNumber ");
}
return (Integer)value;
}
public Object getUntypedSequenceNumber()
{
return this.msg.getField("SequenceNumber");
}
public IFilter getSequenceNumberFilter()
{
return this.msg.getField("SequenceNumber");
}
public BasicHeader setSequenceNumberFilter(IFilter filter)
{
this.msg.addField("SequenceNumber", filter);
return this;
}
public BasicHeader removeSequenceNumber()
{
this.msg.removeField("SequenceNumber");
return this;
}
public boolean isSetSequenceNumber()
{
return this.msg.getField("SequenceNumber") != null;
}
public boolean isFilterSequenceNumber()
{
return this.msg.getField("SequenceNumber") instanceof IFilter;
}
}