blob: 73f026b29736aa75f3d06e5ab8feae5c9fc2ec7b [file] [log] [blame]
#
# Autogenerated by Thrift Compiler (0.18.1)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec
import sys
from thrift.transport import TTransport
all_structs = []
class GatewayGroups(object):
"""
Attributes:
- gatewayId
- adminsGroupId
- readOnlyAdminsGroupId
- defaultGatewayUsersGroupId
"""
def __init__(self, gatewayId=None, adminsGroupId=None, readOnlyAdminsGroupId=None, defaultGatewayUsersGroupId=None,):
self.gatewayId = gatewayId
self.adminsGroupId = adminsGroupId
self.readOnlyAdminsGroupId = readOnlyAdminsGroupId
self.defaultGatewayUsersGroupId = defaultGatewayUsersGroupId
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.gatewayId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.adminsGroupId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.readOnlyAdminsGroupId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.STRING:
self.defaultGatewayUsersGroupId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
oprot.writeStructBegin('GatewayGroups')
if self.gatewayId is not None:
oprot.writeFieldBegin('gatewayId', TType.STRING, 1)
oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId)
oprot.writeFieldEnd()
if self.adminsGroupId is not None:
oprot.writeFieldBegin('adminsGroupId', TType.STRING, 2)
oprot.writeString(self.adminsGroupId.encode('utf-8') if sys.version_info[0] == 2 else self.adminsGroupId)
oprot.writeFieldEnd()
if self.readOnlyAdminsGroupId is not None:
oprot.writeFieldBegin('readOnlyAdminsGroupId', TType.STRING, 3)
oprot.writeString(self.readOnlyAdminsGroupId.encode('utf-8') if sys.version_info[0] == 2 else self.readOnlyAdminsGroupId)
oprot.writeFieldEnd()
if self.defaultGatewayUsersGroupId is not None:
oprot.writeFieldBegin('defaultGatewayUsersGroupId', TType.STRING, 4)
oprot.writeString(self.defaultGatewayUsersGroupId.encode('utf-8') if sys.version_info[0] == 2 else self.defaultGatewayUsersGroupId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.gatewayId is None:
raise TProtocolException(message='Required field gatewayId is unset!')
if self.adminsGroupId is None:
raise TProtocolException(message='Required field adminsGroupId is unset!')
if self.readOnlyAdminsGroupId is None:
raise TProtocolException(message='Required field readOnlyAdminsGroupId is unset!')
if self.defaultGatewayUsersGroupId is None:
raise TProtocolException(message='Required field defaultGatewayUsersGroupId is unset!')
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
all_structs.append(GatewayGroups)
GatewayGroups.thrift_spec = (
None, # 0
(1, TType.STRING, 'gatewayId', 'UTF8', None, ), # 1
(2, TType.STRING, 'adminsGroupId', 'UTF8', None, ), # 2
(3, TType.STRING, 'readOnlyAdminsGroupId', 'UTF8', None, ), # 3
(4, TType.STRING, 'defaultGatewayUsersGroupId', 'UTF8', None, ), # 4
)
fix_spec(all_structs)
del all_structs