// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.7.0
//
//
//
// Generated from file `ExtFaceWithImgOrUrl.ice'
//
// Warning: do not edit this file.
//
//
//
package ExtFaceWithImgOrUrl;
public class InParameters implements java.lang.Cloneable,
java.io.Serializable
{
public byte[] image;
public String imageUrl;
public InParameters()
{
this.imageUrl = "";
}
public InParameters(byte[] image, String imageUrl)
{
this.image = image;
this.imageUrl = imageUrl;
}
public boolean equals(java.lang.Object rhs)
{
if(this == rhs)
{
return true;
}
InParameters r = null;
if(rhs instanceof InParameters)
{
r = (InParameters)rhs;
}
if(r != null)
{
if(!java.util.Arrays.equals(this.image, r.image))
{
return false;
}
if(this.imageUrl != r.imageUrl)
{
if(this.imageUrl == null || r.imageUrl == null || !this.imageUrl.equals(r.imageUrl))
{
return false;
}
}
return true;
}
return false;
}
public int hashCode()
{
int h_ = 5381;
h_ = com.zeroc.IceInternal.HashUtil.hashAdd(h_, "::ExtFaceWithImgOrUrl::InParameters");
h_ = com.zeroc.IceInternal.HashUtil.hashAdd(h_, image);
h_ = com.zeroc.IceInternal.HashUtil.hashAdd(h_, imageUrl);
return h_;
}
public InParameters clone()
{
InParameters c = null;
try
{
c = (InParameters)super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return c;
}
public void ice_writeMembers(com.zeroc.Ice.OutputStream ostr)
{
ostr.writeByteSeq(this.image);
ostr.writeString(this.imageUrl);
}
public void ice_readMembers(com.zeroc.Ice.InputStream istr)
{
this.image = istr.readByteSeq();
this.imageUrl = istr.readString();
}
static public void ice_write(com.zeroc.Ice.OutputStream ostr, InParameters v)
{
if(v == null)
{
_nullMarshalValue.ice_writeMembers(ostr);
}
else
{
v.ice_writeMembers(ostr);
}
}
static public InParameters ice_read(com.zeroc.Ice.InputStream istr)
{
InParameters v = new InParameters();
v.ice_readMembers(istr);
return v;
}
static public void ice_write(com.zeroc.Ice.OutputStream ostr, int tag, java.util.Optional v)
{
if(v != null && v.isPresent())
{
ice_write(ostr, tag, v.get());
}
}
static public void ice_write(com.zeroc.Ice.OutputStream ostr, int tag, InParameters v)
{
if(ostr.writeOptional(tag, com.zeroc.Ice.OptionalFormat.FSize))
{
int pos = ostr.startSize();
ice_write(ostr, v);
ostr.endSize(pos);
}
}
static public java.util.Optional ice_read(com.zeroc.Ice.InputStream istr, int tag)
{
if(istr.readOptional(tag, com.zeroc.Ice.OptionalFormat.FSize))
{
istr.skip(4);
return java.util.Optional.of(InParameters.ice_read(istr));
}
else
{
return java.util.Optional.empty();
}
}
private static final InParameters _nullMarshalValue = new InParameters();
public static final long serialVersionUID = -1998193854L;
}