com.arextest.web.model.mapper.FSRequestMapperImpl Maven / Gradle / Ivy
The newest version!
package com.arextest.web.model.mapper;
import com.arextest.web.model.contract.contracts.common.KeyValuePairType;
import com.arextest.web.model.contract.contracts.common.ScriptBlockType;
import com.arextest.web.model.contract.contracts.filesystem.FSAddItemsByAppAndInterfaceRequestType;
import com.arextest.web.model.contract.contracts.filesystem.FSPinMockRequestType;
import com.arextest.web.model.contract.contracts.filesystem.FSSaveCaseRequestType;
import com.arextest.web.model.contract.contracts.filesystem.FSSaveInterfaceRequestType;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
/*
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-12-23T06:09:23+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class FSRequestMapperImpl implements FSRequestMapper {
@Override
public FSSaveInterfaceRequestType buildSaveInterfaceRequest(FSAddItemsByAppAndInterfaceRequestType request) {
if ( request == null ) {
return null;
}
FSSaveInterfaceRequestType fSSaveInterfaceRequestType = new FSSaveInterfaceRequestType();
fSSaveInterfaceRequestType.setWorkspaceId( request.getWorkspaceId() );
fSSaveInterfaceRequestType.setAddress( request.getAddress() );
List list = request.getPreRequestScripts();
if ( list != null ) {
fSSaveInterfaceRequestType.setPreRequestScripts( new ArrayList( list ) );
}
List list1 = request.getTestScripts();
if ( list1 != null ) {
fSSaveInterfaceRequestType.setTestScripts( new ArrayList( list1 ) );
}
fSSaveInterfaceRequestType.setBody( request.getBody() );
List list2 = request.getHeaders();
if ( list2 != null ) {
fSSaveInterfaceRequestType.setHeaders( new ArrayList( list2 ) );
}
List list3 = request.getParams();
if ( list3 != null ) {
fSSaveInterfaceRequestType.setParams( new ArrayList( list3 ) );
}
fSSaveInterfaceRequestType.setAuth( request.getAuth() );
fSSaveInterfaceRequestType.setTestAddress( request.getTestAddress() );
fSSaveInterfaceRequestType.setDescription( request.getDescription() );
fSSaveInterfaceRequestType.setOperationId( request.getOperationId() );
Set set = request.getLabelIds();
if ( set != null ) {
fSSaveInterfaceRequestType.setLabelIds( new LinkedHashSet( set ) );
}
return fSSaveInterfaceRequestType;
}
@Override
public FSSaveCaseRequestType buildSaveCaseRequest(FSAddItemsByAppAndInterfaceRequestType request) {
if ( request == null ) {
return null;
}
FSSaveCaseRequestType fSSaveCaseRequestType = new FSSaveCaseRequestType();
fSSaveCaseRequestType.setWorkspaceId( request.getWorkspaceId() );
fSSaveCaseRequestType.setAddress( request.getAddress() );
List list = request.getPreRequestScripts();
if ( list != null ) {
fSSaveCaseRequestType.setPreRequestScripts( new ArrayList( list ) );
}
List list1 = request.getTestScripts();
if ( list1 != null ) {
fSSaveCaseRequestType.setTestScripts( new ArrayList( list1 ) );
}
fSSaveCaseRequestType.setBody( request.getBody() );
List list2 = request.getHeaders();
if ( list2 != null ) {
fSSaveCaseRequestType.setHeaders( new ArrayList( list2 ) );
}
List list3 = request.getParams();
if ( list3 != null ) {
fSSaveCaseRequestType.setParams( new ArrayList( list3 ) );
}
fSSaveCaseRequestType.setAuth( request.getAuth() );
fSSaveCaseRequestType.setTestAddress( request.getTestAddress() );
Set set = request.getLabelIds();
if ( set != null ) {
fSSaveCaseRequestType.setLabelIds( new LinkedHashSet( set ) );
}
fSSaveCaseRequestType.setDescription( request.getDescription() );
return fSSaveCaseRequestType;
}
@Override
public FSPinMockRequestType buildPinMockRequest(FSAddItemsByAppAndInterfaceRequestType request) {
if ( request == null ) {
return null;
}
FSPinMockRequestType fSPinMockRequestType = new FSPinMockRequestType();
fSPinMockRequestType.setRecordId( request.getNodeName() );
fSPinMockRequestType.setWorkspaceId( request.getWorkspaceId() );
return fSPinMockRequestType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy