public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("grant_role_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Role_name != null && __isset.role_name)
{
field.Name = "role_name";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(Role_name);
oprot.WriteFieldEnd();
}
if (Principal_name != null && __isset.principal_name)
{
field.Name = "principal_name";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(Principal_name);
oprot.WriteFieldEnd();
}
if (__isset.principal_type)
{
field.Name = "principal_type";
field.Type = TType.I32;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)Principal_type);
oprot.WriteFieldEnd();
}
if (Grantor != null && __isset.grantor)
{
field.Name = "grantor";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteString(Grantor);
oprot.WriteFieldEnd();
}
if (__isset.grantorType)
{
field.Name = "grantorType";
field.Type = TType.I32;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)GrantorType);
oprot.WriteFieldEnd();
}
if (__isset.grant_option)
{
field.Name = "grant_option";
field.Type = TType.Bool;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Grant_option);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}