http://git-wip-us.apache.org/repos/asf/airavata/blob/e0613616/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php index 098511f..d929439 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php @@ -629,6 +629,10 @@ class Gateway { /** * @var string */ + public $airavataInternalGatewayId = null; + /** + * @var string + */ public $gatewayId = null; /** * @var int @@ -707,84 +711,91 @@ class Gateway { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'gatewayId', + 'var' => 'airavataInternalGatewayId', 'type' => TType::STRING, ), 2 => array( + 'var' => 'gatewayId', + 'type' => TType::STRING, + ), + 3 => array( 'var' => 'gatewayApprovalStatus', 'type' => TType::I32, ), - 3 => array( + 4 => array( 'var' => 'gatewayName', 'type' => TType::STRING, ), - 4 => array( + 5 => array( 'var' => 'domain', 'type' => TType::STRING, ), - 5 => array( + 6 => array( 'var' => 'emailAddress', 'type' => TType::STRING, ), - 6 => array( + 7 => array( 'var' => 'gatewayAcronym', 'type' => TType::STRING, ), - 7 => array( + 8 => array( 'var' => 'gatewayURL', 'type' => TType::STRING, ), - 8 => array( + 9 => array( 'var' => 'gatewayPublicAbstract', 'type' => TType::STRING, ), - 9 => array( + 10 => array( 'var' => 'reviewProposalDescription', 'type' => TType::STRING, ), - 10 => array( + 11 => array( 'var' => 'gatewayAdminFirstName', 'type' => TType::STRING, ), - 11 => array( + 12 => array( 'var' => 'gatewayAdminLastName', 'type' => TType::STRING, ), - 12 => array( + 13 => array( 'var' => 'gatewayAdminEmail', 'type' => TType::STRING, ), - 13 => array( + 14 => array( 'var' => 'identityServerUserName', 'type' => TType::STRING, ), - 14 => array( + 15 => array( 'var' => 'identityServerPasswordToken', 'type' => TType::STRING, ), - 15 => array( + 16 => array( 'var' => 'declinedReason', 'type' => TType::STRING, ), - 16 => array( + 17 => array( 'var' => 'oauthClientId', 'type' => TType::STRING, ), - 17 => array( + 18 => array( 'var' => 'oauthClientSecret', 'type' => TType::STRING, ), - 18 => array( + 19 => array( 'var' => 'requestCreationTime', 'type' => TType::I64, ), - 19 => array( + 20 => array( 'var' => 'requesterUsername', 'type' => TType::STRING, ), ); } if (is_array($vals)) { + if (isset($vals['airavataInternalGatewayId'])) { + $this->airavataInternalGatewayId = $vals['airavataInternalGatewayId']; + } if (isset($vals['gatewayId'])) { $this->gatewayId = $vals['gatewayId']; } @@ -866,131 +877,138 @@ class Gateway { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->gatewayId); + $xfer += $input->readString($this->airavataInternalGatewayId); } else { $xfer += $input->skip($ftype); } break; case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->gatewayId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::I32) { $xfer += $input->readI32($this->gatewayApprovalStatus); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayName); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 5: if ($ftype == TType::STRING) { $xfer += $input->readString($this->domain); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 6: if ($ftype == TType::STRING) { $xfer += $input->readString($this->emailAddress); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 7: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayAcronym); } else { $xfer += $input->skip($ftype); } break; - case 7: + case 8: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayURL); } else { $xfer += $input->skip($ftype); } break; - case 8: + case 9: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayPublicAbstract); } else { $xfer += $input->skip($ftype); } break; - case 9: + case 10: if ($ftype == TType::STRING) { $xfer += $input->readString($this->reviewProposalDescription); } else { $xfer += $input->skip($ftype); } break; - case 10: + case 11: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayAdminFirstName); } else { $xfer += $input->skip($ftype); } break; - case 11: + case 12: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayAdminLastName); } else { $xfer += $input->skip($ftype); } break; - case 12: + case 13: if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayAdminEmail); } else { $xfer += $input->skip($ftype); } break; - case 13: + case 14: if ($ftype == TType::STRING) { $xfer += $input->readString($this->identityServerUserName); } else { $xfer += $input->skip($ftype); } break; - case 14: + case 15: if ($ftype == TType::STRING) { $xfer += $input->readString($this->identityServerPasswordToken); } else { $xfer += $input->skip($ftype); } break; - case 15: + case 16: if ($ftype == TType::STRING) { $xfer += $input->readString($this->declinedReason); } else { $xfer += $input->skip($ftype); } break; - case 16: + case 17: if ($ftype == TType::STRING) { $xfer += $input->readString($this->oauthClientId); } else { $xfer += $input->skip($ftype); } break; - case 17: + case 18: if ($ftype == TType::STRING) { $xfer += $input->readString($this->oauthClientSecret); } else { $xfer += $input->skip($ftype); } break; - case 18: + case 19: if ($ftype == TType::I64) { $xfer += $input->readI64($this->requestCreationTime); } else { $xfer += $input->skip($ftype); } break; - case 19: + case 20: if ($ftype == TType::STRING) { $xfer += $input->readString($this->requesterUsername); } else { @@ -1010,98 +1028,103 @@ class Gateway { public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('Gateway'); + if ($this->airavataInternalGatewayId !== null) { + $xfer += $output->writeFieldBegin('airavataInternalGatewayId', TType::STRING, 1); + $xfer += $output->writeString($this->airavataInternalGatewayId); + $xfer += $output->writeFieldEnd(); + } if ($this->gatewayId !== null) { - $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2); $xfer += $output->writeString($this->gatewayId); $xfer += $output->writeFieldEnd(); } if ($this->gatewayApprovalStatus !== null) { - $xfer += $output->writeFieldBegin('gatewayApprovalStatus', TType::I32, 2); + $xfer += $output->writeFieldBegin('gatewayApprovalStatus', TType::I32, 3); $xfer += $output->writeI32($this->gatewayApprovalStatus); $xfer += $output->writeFieldEnd(); } if ($this->gatewayName !== null) { - $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 3); + $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 4); $xfer += $output->writeString($this->gatewayName); $xfer += $output->writeFieldEnd(); } if ($this->domain !== null) { - $xfer += $output->writeFieldBegin('domain', TType::STRING, 4); + $xfer += $output->writeFieldBegin('domain', TType::STRING, 5); $xfer += $output->writeString($this->domain); $xfer += $output->writeFieldEnd(); } if ($this->emailAddress !== null) { - $xfer += $output->writeFieldBegin('emailAddress', TType::STRING, 5); + $xfer += $output->writeFieldBegin('emailAddress', TType::STRING, 6); $xfer += $output->writeString($this->emailAddress); $xfer += $output->writeFieldEnd(); } if ($this->gatewayAcronym !== null) { - $xfer += $output->writeFieldBegin('gatewayAcronym', TType::STRING, 6); + $xfer += $output->writeFieldBegin('gatewayAcronym', TType::STRING, 7); $xfer += $output->writeString($this->gatewayAcronym); $xfer += $output->writeFieldEnd(); } if ($this->gatewayURL !== null) { - $xfer += $output->writeFieldBegin('gatewayURL', TType::STRING, 7); + $xfer += $output->writeFieldBegin('gatewayURL', TType::STRING, 8); $xfer += $output->writeString($this->gatewayURL); $xfer += $output->writeFieldEnd(); } if ($this->gatewayPublicAbstract !== null) { - $xfer += $output->writeFieldBegin('gatewayPublicAbstract', TType::STRING, 8); + $xfer += $output->writeFieldBegin('gatewayPublicAbstract', TType::STRING, 9); $xfer += $output->writeString($this->gatewayPublicAbstract); $xfer += $output->writeFieldEnd(); } if ($this->reviewProposalDescription !== null) { - $xfer += $output->writeFieldBegin('reviewProposalDescription', TType::STRING, 9); + $xfer += $output->writeFieldBegin('reviewProposalDescription', TType::STRING, 10); $xfer += $output->writeString($this->reviewProposalDescription); $xfer += $output->writeFieldEnd(); } if ($this->gatewayAdminFirstName !== null) { - $xfer += $output->writeFieldBegin('gatewayAdminFirstName', TType::STRING, 10); + $xfer += $output->writeFieldBegin('gatewayAdminFirstName', TType::STRING, 11); $xfer += $output->writeString($this->gatewayAdminFirstName); $xfer += $output->writeFieldEnd(); } if ($this->gatewayAdminLastName !== null) { - $xfer += $output->writeFieldBegin('gatewayAdminLastName', TType::STRING, 11); + $xfer += $output->writeFieldBegin('gatewayAdminLastName', TType::STRING, 12); $xfer += $output->writeString($this->gatewayAdminLastName); $xfer += $output->writeFieldEnd(); } if ($this->gatewayAdminEmail !== null) { - $xfer += $output->writeFieldBegin('gatewayAdminEmail', TType::STRING, 12); + $xfer += $output->writeFieldBegin('gatewayAdminEmail', TType::STRING, 13); $xfer += $output->writeString($this->gatewayAdminEmail); $xfer += $output->writeFieldEnd(); } if ($this->identityServerUserName !== null) { - $xfer += $output->writeFieldBegin('identityServerUserName', TType::STRING, 13); + $xfer += $output->writeFieldBegin('identityServerUserName', TType::STRING, 14); $xfer += $output->writeString($this->identityServerUserName); $xfer += $output->writeFieldEnd(); } if ($this->identityServerPasswordToken !== null) { - $xfer += $output->writeFieldBegin('identityServerPasswordToken', TType::STRING, 14); + $xfer += $output->writeFieldBegin('identityServerPasswordToken', TType::STRING, 15); $xfer += $output->writeString($this->identityServerPasswordToken); $xfer += $output->writeFieldEnd(); } if ($this->declinedReason !== null) { - $xfer += $output->writeFieldBegin('declinedReason', TType::STRING, 15); + $xfer += $output->writeFieldBegin('declinedReason', TType::STRING, 16); $xfer += $output->writeString($this->declinedReason); $xfer += $output->writeFieldEnd(); } if ($this->oauthClientId !== null) { - $xfer += $output->writeFieldBegin('oauthClientId', TType::STRING, 16); + $xfer += $output->writeFieldBegin('oauthClientId', TType::STRING, 17); $xfer += $output->writeString($this->oauthClientId); $xfer += $output->writeFieldEnd(); } if ($this->oauthClientSecret !== null) { - $xfer += $output->writeFieldBegin('oauthClientSecret', TType::STRING, 17); + $xfer += $output->writeFieldBegin('oauthClientSecret', TType::STRING, 18); $xfer += $output->writeString($this->oauthClientSecret); $xfer += $output->writeFieldEnd(); } if ($this->requestCreationTime !== null) { - $xfer += $output->writeFieldBegin('requestCreationTime', TType::I64, 18); + $xfer += $output->writeFieldBegin('requestCreationTime', TType::I64, 19); $xfer += $output->writeI64($this->requestCreationTime); $xfer += $output->writeFieldEnd(); } if ($this->requesterUsername !== null) { - $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 19); + $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 20); $xfer += $output->writeString($this->requesterUsername); $xfer += $output->writeFieldEnd(); }
http://git-wip-us.apache.org/repos/asf/airavata/blob/e0613616/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php index a6cb9ff..bda8df7 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php @@ -73,6 +73,13 @@ interface IamAdminServicesIf { * @throws \Airavata\API\Error\AuthorizationException */ public function findUsers(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $email, $userId, \Airavata\Model\Credential\Store\PasswordCredential $isRealmAdminCredentials); + /** + * @param \Airavata\Model\Security\AuthzToken $authzToken + * @param \Airavata\Model\User\UserProfile $userDetails + * @throws \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException + * @throws \Airavata\API\Error\AuthorizationException + */ + public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails); } class IamAdminServicesClient implements \Airavata\Service\Iam\Admin\Services\CPI\IamAdminServicesIf { @@ -442,6 +449,61 @@ class IamAdminServicesClient implements \Airavata\Service\Iam\Admin\Services\CPI throw new \Exception("findUsers failed: unknown result"); } + public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails) + { + $this->send_updateUserProfile($authzToken, $userDetails); + $this->recv_updateUserProfile(); + } + + public function send_updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails) + { + $args = new \Airavata\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_args(); + $args->authzToken = $authzToken; + $args->userDetails = $userDetails; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'updateUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('updateUserProfile', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_updateUserProfile() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->Idse !== null) { + throw $result->Idse; + } + if ($result->ae !== null) { + throw $result->ae; + } + return; + } + } // HELPER FUNCTIONS AND STRUCTURES @@ -2066,4 +2128,214 @@ class IamAdminServices_findUsers_result { } +class IamAdminServices_updateUserProfile_args { + static $_TSPEC; + + /** + * @var \Airavata\Model\Security\AuthzToken + */ + public $authzToken = null; + /** + * @var \Airavata\Model\User\UserProfile + */ + public $userDetails = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'authzToken', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Security\AuthzToken', + ), + 2 => array( + 'var' => 'userDetails', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\User\UserProfile', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['authzToken'])) { + $this->authzToken = $vals['authzToken']; + } + if (isset($vals['userDetails'])) { + $this->userDetails = $vals['userDetails']; + } + } + } + + public function getName() { + return 'IamAdminServices_updateUserProfile_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->authzToken = new \Airavata\Model\Security\AuthzToken(); + $xfer += $this->authzToken->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->userDetails = new \Airavata\Model\User\UserProfile(); + $xfer += $this->userDetails->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('IamAdminServices_updateUserProfile_args'); + if ($this->authzToken !== null) { + if (!is_object($this->authzToken)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1); + $xfer += $this->authzToken->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->userDetails !== null) { + if (!is_object($this->userDetails)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('userDetails', TType::STRUCT, 2); + $xfer += $this->userDetails->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class IamAdminServices_updateUserProfile_result { + static $_TSPEC; + + /** + * @var \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException + */ + public $Idse = null; + /** + * @var \Airavata\API\Error\AuthorizationException + */ + public $ae = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'Idse', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException', + ), + 2 => array( + 'var' => 'ae', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AuthorizationException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['Idse'])) { + $this->Idse = $vals['Idse']; + } + if (isset($vals['ae'])) { + $this->ae = $vals['ae']; + } + } + } + + public function getName() { + return 'IamAdminServices_updateUserProfile_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->Idse = new \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException(); + $xfer += $this->Idse->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ae = new \Airavata\API\Error\AuthorizationException(); + $xfer += $this->ae->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('IamAdminServices_updateUserProfile_result'); + if ($this->Idse !== null) { + $xfer += $output->writeFieldBegin('Idse', TType::STRUCT, 1); + $xfer += $this->Idse->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ae !== null) { + $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2); + $xfer += $this->ae->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/e0613616/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php index e38efa1..c367cad 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php @@ -50,12 +50,13 @@ interface TenantProfileServiceIf { public function getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId); /** * @param \Airavata\Model\Security\AuthzToken $authzToken + * @param string $airavataInternalGatewayId * @param string $gatewayId * @return bool * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException * @throws \Airavata\API\Error\AuthorizationException */ - public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId); + public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId); /** * @param \Airavata\Model\Security\AuthzToken $authzToken * @return \Airavata\Model\Workspace\Gateway[] @@ -71,6 +72,14 @@ interface TenantProfileServiceIf { * @throws \Airavata\API\Error\AuthorizationException */ public function isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId); + /** + * @param \Airavata\Model\Security\AuthzToken $authzToken + * @param string $requesterUsername + * @return \Airavata\Model\Workspace\Gateway[] + * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException + * @throws \Airavata\API\Error\AuthorizationException + */ + public function getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername); } class TenantProfileServiceClient implements \Airavata\Service\Profile\Tenant\CPI\TenantProfileServiceIf { @@ -315,16 +324,17 @@ class TenantProfileServiceClient implements \Airavata\Service\Profile\Tenant\CPI throw new \Exception("getGateway failed: unknown result"); } - public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId) + public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId) { - $this->send_deleteGateway($authzToken, $gatewayId); + $this->send_deleteGateway($authzToken, $airavataInternalGatewayId, $gatewayId); return $this->recv_deleteGateway(); } - public function send_deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId) + public function send_deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId) { $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_deleteGateway_args(); $args->authzToken = $authzToken; + $args->airavataInternalGatewayId = $airavataInternalGatewayId; $args->gatewayId = $gatewayId; $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) @@ -488,6 +498,64 @@ class TenantProfileServiceClient implements \Airavata\Service\Profile\Tenant\CPI throw new \Exception("isGatewayExist failed: unknown result"); } + public function getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername) + { + $this->send_getAllGatewaysForUser($authzToken, $requesterUsername); + return $this->recv_getAllGatewaysForUser(); + } + + public function send_getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername) + { + $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_args(); + $args->authzToken = $authzToken; + $args->requesterUsername = $requesterUsername; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getAllGatewaysForUser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getAllGatewaysForUser', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getAllGatewaysForUser() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->tpe !== null) { + throw $result->tpe; + } + if ($result->ae !== null) { + throw $result->ae; + } + throw new \Exception("getAllGatewaysForUser failed: unknown result"); + } + } // HELPER FUNCTIONS AND STRUCTURES @@ -1406,6 +1474,10 @@ class TenantProfileService_deleteGateway_args { /** * @var string */ + public $airavataInternalGatewayId = null; + /** + * @var string + */ public $gatewayId = null; public function __construct($vals=null) { @@ -1417,6 +1489,10 @@ class TenantProfileService_deleteGateway_args { 'class' => '\Airavata\Model\Security\AuthzToken', ), 2 => array( + 'var' => 'airavataInternalGatewayId', + 'type' => TType::STRING, + ), + 3 => array( 'var' => 'gatewayId', 'type' => TType::STRING, ), @@ -1426,6 +1502,9 @@ class TenantProfileService_deleteGateway_args { if (isset($vals['authzToken'])) { $this->authzToken = $vals['authzToken']; } + if (isset($vals['airavataInternalGatewayId'])) { + $this->airavataInternalGatewayId = $vals['airavataInternalGatewayId']; + } if (isset($vals['gatewayId'])) { $this->gatewayId = $vals['gatewayId']; } @@ -1461,6 +1540,13 @@ class TenantProfileService_deleteGateway_args { break; case 2: if ($ftype == TType::STRING) { + $xfer += $input->readString($this->airavataInternalGatewayId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { $xfer += $input->readString($this->gatewayId); } else { $xfer += $input->skip($ftype); @@ -1487,8 +1573,13 @@ class TenantProfileService_deleteGateway_args { $xfer += $this->authzToken->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->airavataInternalGatewayId !== null) { + $xfer += $output->writeFieldBegin('airavataInternalGatewayId', TType::STRING, 2); + $xfer += $output->writeString($this->airavataInternalGatewayId); + $xfer += $output->writeFieldEnd(); + } if ($this->gatewayId !== null) { - $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2); + $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3); $xfer += $output->writeString($this->gatewayId); $xfer += $output->writeFieldEnd(); } @@ -2085,4 +2176,260 @@ class TenantProfileService_isGatewayExist_result { } +class TenantProfileService_getAllGatewaysForUser_args { + static $_TSPEC; + + /** + * @var \Airavata\Model\Security\AuthzToken + */ + public $authzToken = null; + /** + * @var string + */ + public $requesterUsername = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'authzToken', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Security\AuthzToken', + ), + 2 => array( + 'var' => 'requesterUsername', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['authzToken'])) { + $this->authzToken = $vals['authzToken']; + } + if (isset($vals['requesterUsername'])) { + $this->requesterUsername = $vals['requesterUsername']; + } + } + } + + public function getName() { + return 'TenantProfileService_getAllGatewaysForUser_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->authzToken = new \Airavata\Model\Security\AuthzToken(); + $xfer += $this->authzToken->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->requesterUsername); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TenantProfileService_getAllGatewaysForUser_args'); + if ($this->authzToken !== null) { + if (!is_object($this->authzToken)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1); + $xfer += $this->authzToken->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->requesterUsername !== null) { + $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 2); + $xfer += $output->writeString($this->requesterUsername); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TenantProfileService_getAllGatewaysForUser_result { + static $_TSPEC; + + /** + * @var \Airavata\Model\Workspace\Gateway[] + */ + public $success = null; + /** + * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException + */ + public $tpe = null; + /** + * @var \Airavata\API\Error\AuthorizationException + */ + public $ae = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Workspace\Gateway', + ), + ), + 1 => array( + 'var' => 'tpe', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException', + ), + 2 => array( + 'var' => 'ae', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AuthorizationException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['tpe'])) { + $this->tpe = $vals['tpe']; + } + if (isset($vals['ae'])) { + $this->ae = $vals['ae']; + } + } + } + + public function getName() { + return 'TenantProfileService_getAllGatewaysForUser_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $elem12 = new \Airavata\Model\Workspace\Gateway(); + $xfer += $elem12->read($input); + $this->success []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException(); + $xfer += $this->tpe->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ae = new \Airavata\API\Error\AuthorizationException(); + $xfer += $this->ae->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TenantProfileService_getAllGatewaysForUser_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter13) + { + $xfer += $iter13->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->tpe !== null) { + $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1); + $xfer += $this->tpe->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ae !== null) { + $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2); + $xfer += $this->ae->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/e0613616/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java index 039a1f9..c6b8baa 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java @@ -82,37 +82,33 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields schemes.put(TupleScheme.class, new GatewayTupleSchemeFactory()); } - public String airavataInternalGatewayId; // optional - public String gatewayId; // required - /** - * - * @see GatewayApprovalStatus - */ - public GatewayApprovalStatus gatewayApprovalStatus; // required - public String gatewayName; // optional - public String domain; // optional - public String emailAddress; // optional - public String gatewayAcronym; // optional - public String gatewayURL; // optional - public String gatewayPublicAbstract; // optional - public String reviewProposalDescription; // optional - public String gatewayAdminFirstName; // optional - public String gatewayAdminLastName; // optional - public String gatewayAdminEmail; // optional - public String identityServerUserName; // optional - public String identityServerPasswordToken; // optional - public String declinedReason; // optional - public String oauthClientId; // optional - public String oauthClientSecret; // optional - public long requestCreationTime; // optional - public String requesterUsername; // optional + private String airavataInternalGatewayId; // optional + private String gatewayId; // required + private GatewayApprovalStatus gatewayApprovalStatus; // required + private String gatewayName; // optional + private String domain; // optional + private String emailAddress; // optional + private String gatewayAcronym; // optional + private String gatewayURL; // optional + private String gatewayPublicAbstract; // optional + private String reviewProposalDescription; // optional + private String gatewayAdminFirstName; // optional + private String gatewayAdminLastName; // optional + private String gatewayAdminEmail; // optional + private String identityServerUserName; // optional + private String identityServerPasswordToken; // optional + private String declinedReason; // optional + private String oauthClientId; // optional + private String oauthClientSecret; // optional + private long requestCreationTime; // optional + private String requesterUsername; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AIRAVATA_INTERNAL_GATEWAY_ID((short)1, "airavataInternalGatewayId"), GATEWAY_ID((short)2, "gatewayId"), /** - * + * * @see GatewayApprovalStatus */ GATEWAY_APPROVAL_STATUS((short)3, "gatewayApprovalStatus"), @@ -233,46 +229,46 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.AIRAVATA_INTERNAL_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalGatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_APPROVAL_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayApprovalStatus", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GatewayApprovalStatus.class))); - tmpMap.put(_Fields.GATEWAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EMAIL_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("emailAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ACRONYM, new org.apache.thrift.meta_data.FieldMetaData("gatewayAcronym", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_URL, new org.apache.thrift.meta_data.FieldMetaData("gatewayURL", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_PUBLIC_ABSTRACT, new org.apache.thrift.meta_data.FieldMetaData("gatewayPublicAbstract", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REVIEW_PROPOSAL_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("reviewProposalDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ADMIN_FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminFirstName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ADMIN_LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminLastName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ADMIN_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminEmail", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IDENTITY_SERVER_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("identityServerUserName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IDENTITY_SERVER_PASSWORD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("identityServerPasswordToken", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DECLINED_REASON, new org.apache.thrift.meta_data.FieldMetaData("declinedReason", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OAUTH_CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("oauthClientId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OAUTH_CLIENT_SECRET, new org.apache.thrift.meta_data.FieldMetaData("oauthClientSecret", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.REQUEST_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("requestCreationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.REQUESTER_USERNAME, new org.apache.thrift.meta_data.FieldMetaData("requesterUsername", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AIRAVATA_INTERNAL_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalGatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_APPROVAL_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayApprovalStatus", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GatewayApprovalStatus.class))); + tmpMap.put(_Fields.GATEWAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EMAIL_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("emailAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ACRONYM, new org.apache.thrift.meta_data.FieldMetaData("gatewayAcronym", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_URL, new org.apache.thrift.meta_data.FieldMetaData("gatewayURL", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_PUBLIC_ABSTRACT, new org.apache.thrift.meta_data.FieldMetaData("gatewayPublicAbstract", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REVIEW_PROPOSAL_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("reviewProposalDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ADMIN_FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminFirstName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ADMIN_LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminLastName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ADMIN_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("gatewayAdminEmail", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IDENTITY_SERVER_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("identityServerUserName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IDENTITY_SERVER_PASSWORD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("identityServerPasswordToken", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DECLINED_REASON, new org.apache.thrift.meta_data.FieldMetaData("declinedReason", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OAUTH_CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("oauthClientId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OAUTH_CLIENT_SECRET, new org.apache.thrift.meta_data.FieldMetaData("oauthClientSecret", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REQUEST_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("requestCreationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.REQUESTER_USERNAME, new org.apache.thrift.meta_data.FieldMetaData("requesterUsername", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Gateway.class, metaDataMap); } @@ -281,8 +277,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields } public Gateway( - String gatewayId, - GatewayApprovalStatus gatewayApprovalStatus) + String gatewayId, + GatewayApprovalStatus gatewayApprovalStatus) { this(); this.gatewayId = gatewayId; @@ -387,9 +383,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.airavataInternalGatewayId; } - public Gateway setAiravataInternalGatewayId(String airavataInternalGatewayId) { + public void setAiravataInternalGatewayId(String airavataInternalGatewayId) { this.airavataInternalGatewayId = airavataInternalGatewayId; - return this; } public void unsetAiravataInternalGatewayId() { @@ -411,9 +406,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayId; } - public Gateway setGatewayId(String gatewayId) { + public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; - return this; } public void unsetGatewayId() { @@ -432,7 +426,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields } /** - * + * * @see GatewayApprovalStatus */ public GatewayApprovalStatus getGatewayApprovalStatus() { @@ -440,12 +434,11 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields } /** - * + * * @see GatewayApprovalStatus */ - public Gateway setGatewayApprovalStatus(GatewayApprovalStatus gatewayApprovalStatus) { + public void setGatewayApprovalStatus(GatewayApprovalStatus gatewayApprovalStatus) { this.gatewayApprovalStatus = gatewayApprovalStatus; - return this; } public void unsetGatewayApprovalStatus() { @@ -467,9 +460,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayName; } - public Gateway setGatewayName(String gatewayName) { + public void setGatewayName(String gatewayName) { this.gatewayName = gatewayName; - return this; } public void unsetGatewayName() { @@ -491,9 +483,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.domain; } - public Gateway setDomain(String domain) { + public void setDomain(String domain) { this.domain = domain; - return this; } public void unsetDomain() { @@ -515,9 +506,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.emailAddress; } - public Gateway setEmailAddress(String emailAddress) { + public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; - return this; } public void unsetEmailAddress() { @@ -539,9 +529,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayAcronym; } - public Gateway setGatewayAcronym(String gatewayAcronym) { + public void setGatewayAcronym(String gatewayAcronym) { this.gatewayAcronym = gatewayAcronym; - return this; } public void unsetGatewayAcronym() { @@ -563,9 +552,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayURL; } - public Gateway setGatewayURL(String gatewayURL) { + public void setGatewayURL(String gatewayURL) { this.gatewayURL = gatewayURL; - return this; } public void unsetGatewayURL() { @@ -587,9 +575,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayPublicAbstract; } - public Gateway setGatewayPublicAbstract(String gatewayPublicAbstract) { + public void setGatewayPublicAbstract(String gatewayPublicAbstract) { this.gatewayPublicAbstract = gatewayPublicAbstract; - return this; } public void unsetGatewayPublicAbstract() { @@ -611,9 +598,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.reviewProposalDescription; } - public Gateway setReviewProposalDescription(String reviewProposalDescription) { + public void setReviewProposalDescription(String reviewProposalDescription) { this.reviewProposalDescription = reviewProposalDescription; - return this; } public void unsetReviewProposalDescription() { @@ -635,9 +621,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayAdminFirstName; } - public Gateway setGatewayAdminFirstName(String gatewayAdminFirstName) { + public void setGatewayAdminFirstName(String gatewayAdminFirstName) { this.gatewayAdminFirstName = gatewayAdminFirstName; - return this; } public void unsetGatewayAdminFirstName() { @@ -659,9 +644,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayAdminLastName; } - public Gateway setGatewayAdminLastName(String gatewayAdminLastName) { + public void setGatewayAdminLastName(String gatewayAdminLastName) { this.gatewayAdminLastName = gatewayAdminLastName; - return this; } public void unsetGatewayAdminLastName() { @@ -683,9 +667,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.gatewayAdminEmail; } - public Gateway setGatewayAdminEmail(String gatewayAdminEmail) { + public void setGatewayAdminEmail(String gatewayAdminEmail) { this.gatewayAdminEmail = gatewayAdminEmail; - return this; } public void unsetGatewayAdminEmail() { @@ -707,9 +690,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.identityServerUserName; } - public Gateway setIdentityServerUserName(String identityServerUserName) { + public void setIdentityServerUserName(String identityServerUserName) { this.identityServerUserName = identityServerUserName; - return this; } public void unsetIdentityServerUserName() { @@ -731,9 +713,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.identityServerPasswordToken; } - public Gateway setIdentityServerPasswordToken(String identityServerPasswordToken) { + public void setIdentityServerPasswordToken(String identityServerPasswordToken) { this.identityServerPasswordToken = identityServerPasswordToken; - return this; } public void unsetIdentityServerPasswordToken() { @@ -755,9 +736,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.declinedReason; } - public Gateway setDeclinedReason(String declinedReason) { + public void setDeclinedReason(String declinedReason) { this.declinedReason = declinedReason; - return this; } public void unsetDeclinedReason() { @@ -779,9 +759,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.oauthClientId; } - public Gateway setOauthClientId(String oauthClientId) { + public void setOauthClientId(String oauthClientId) { this.oauthClientId = oauthClientId; - return this; } public void unsetOauthClientId() { @@ -803,9 +782,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.oauthClientSecret; } - public Gateway setOauthClientSecret(String oauthClientSecret) { + public void setOauthClientSecret(String oauthClientSecret) { this.oauthClientSecret = oauthClientSecret; - return this; } public void unsetOauthClientSecret() { @@ -827,10 +805,9 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.requestCreationTime; } - public Gateway setRequestCreationTime(long requestCreationTime) { + public void setRequestCreationTime(long requestCreationTime) { this.requestCreationTime = requestCreationTime; setRequestCreationTimeIsSet(true); - return this; } public void unsetRequestCreationTime() { @@ -850,9 +827,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields return this.requesterUsername; } - public Gateway setRequesterUsername(String requesterUsername) { + public void setRequesterUsername(String requesterUsername) { this.requesterUsername = requesterUsername; - return this; } public void unsetRequesterUsername() { @@ -872,230 +848,230 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields public void setFieldValue(_Fields field, Object value) { switch (field) { - case AIRAVATA_INTERNAL_GATEWAY_ID: - if (value == null) { - unsetAiravataInternalGatewayId(); - } else { - setAiravataInternalGatewayId((String)value); - } - break; + case AIRAVATA_INTERNAL_GATEWAY_ID: + if (value == null) { + unsetAiravataInternalGatewayId(); + } else { + setAiravataInternalGatewayId((String)value); + } + break; - case GATEWAY_ID: - if (value == null) { - unsetGatewayId(); - } else { - setGatewayId((String)value); - } - break; + case GATEWAY_ID: + if (value == null) { + unsetGatewayId(); + } else { + setGatewayId((String)value); + } + break; - case GATEWAY_APPROVAL_STATUS: - if (value == null) { - unsetGatewayApprovalStatus(); - } else { - setGatewayApprovalStatus((GatewayApprovalStatus)value); - } - break; + case GATEWAY_APPROVAL_STATUS: + if (value == null) { + unsetGatewayApprovalStatus(); + } else { + setGatewayApprovalStatus((GatewayApprovalStatus)value); + } + break; - case GATEWAY_NAME: - if (value == null) { - unsetGatewayName(); - } else { - setGatewayName((String)value); - } - break; + case GATEWAY_NAME: + if (value == null) { + unsetGatewayName(); + } else { + setGatewayName((String)value); + } + break; - case DOMAIN: - if (value == null) { - unsetDomain(); - } else { - setDomain((String)value); - } - break; + case DOMAIN: + if (value == null) { + unsetDomain(); + } else { + setDomain((String)value); + } + break; - case EMAIL_ADDRESS: - if (value == null) { - unsetEmailAddress(); - } else { - setEmailAddress((String)value); - } - break; + case EMAIL_ADDRESS: + if (value == null) { + unsetEmailAddress(); + } else { + setEmailAddress((String)value); + } + break; - case GATEWAY_ACRONYM: - if (value == null) { - unsetGatewayAcronym(); - } else { - setGatewayAcronym((String)value); - } - break; + case GATEWAY_ACRONYM: + if (value == null) { + unsetGatewayAcronym(); + } else { + setGatewayAcronym((String)value); + } + break; - case GATEWAY_URL: - if (value == null) { - unsetGatewayURL(); - } else { - setGatewayURL((String)value); - } - break; + case GATEWAY_URL: + if (value == null) { + unsetGatewayURL(); + } else { + setGatewayURL((String)value); + } + break; - case GATEWAY_PUBLIC_ABSTRACT: - if (value == null) { - unsetGatewayPublicAbstract(); - } else { - setGatewayPublicAbstract((String)value); - } - break; + case GATEWAY_PUBLIC_ABSTRACT: + if (value == null) { + unsetGatewayPublicAbstract(); + } else { + setGatewayPublicAbstract((String)value); + } + break; - case REVIEW_PROPOSAL_DESCRIPTION: - if (value == null) { - unsetReviewProposalDescription(); - } else { - setReviewProposalDescription((String)value); - } - break; + case REVIEW_PROPOSAL_DESCRIPTION: + if (value == null) { + unsetReviewProposalDescription(); + } else { + setReviewProposalDescription((String)value); + } + break; - case GATEWAY_ADMIN_FIRST_NAME: - if (value == null) { - unsetGatewayAdminFirstName(); - } else { - setGatewayAdminFirstName((String)value); - } - break; + case GATEWAY_ADMIN_FIRST_NAME: + if (value == null) { + unsetGatewayAdminFirstName(); + } else { + setGatewayAdminFirstName((String)value); + } + break; - case GATEWAY_ADMIN_LAST_NAME: - if (value == null) { - unsetGatewayAdminLastName(); - } else { - setGatewayAdminLastName((String)value); - } - break; + case GATEWAY_ADMIN_LAST_NAME: + if (value == null) { + unsetGatewayAdminLastName(); + } else { + setGatewayAdminLastName((String)value); + } + break; - case GATEWAY_ADMIN_EMAIL: - if (value == null) { - unsetGatewayAdminEmail(); - } else { - setGatewayAdminEmail((String)value); - } - break; + case GATEWAY_ADMIN_EMAIL: + if (value == null) { + unsetGatewayAdminEmail(); + } else { + setGatewayAdminEmail((String)value); + } + break; - case IDENTITY_SERVER_USER_NAME: - if (value == null) { - unsetIdentityServerUserName(); - } else { - setIdentityServerUserName((String)value); - } - break; + case IDENTITY_SERVER_USER_NAME: + if (value == null) { + unsetIdentityServerUserName(); + } else { + setIdentityServerUserName((String)value); + } + break; - case IDENTITY_SERVER_PASSWORD_TOKEN: - if (value == null) { - unsetIdentityServerPasswordToken(); - } else { - setIdentityServerPasswordToken((String)value); - } - break; + case IDENTITY_SERVER_PASSWORD_TOKEN: + if (value == null) { + unsetIdentityServerPasswordToken(); + } else { + setIdentityServerPasswordToken((String)value); + } + break; - case DECLINED_REASON: - if (value == null) { - unsetDeclinedReason(); - } else { - setDeclinedReason((String)value); - } - break; + case DECLINED_REASON: + if (value == null) { + unsetDeclinedReason(); + } else { + setDeclinedReason((String)value); + } + break; - case OAUTH_CLIENT_ID: - if (value == null) { - unsetOauthClientId(); - } else { - setOauthClientId((String)value); - } - break; + case OAUTH_CLIENT_ID: + if (value == null) { + unsetOauthClientId(); + } else { + setOauthClientId((String)value); + } + break; - case OAUTH_CLIENT_SECRET: - if (value == null) { - unsetOauthClientSecret(); - } else { - setOauthClientSecret((String)value); - } - break; + case OAUTH_CLIENT_SECRET: + if (value == null) { + unsetOauthClientSecret(); + } else { + setOauthClientSecret((String)value); + } + break; - case REQUEST_CREATION_TIME: - if (value == null) { - unsetRequestCreationTime(); - } else { - setRequestCreationTime((Long)value); - } - break; + case REQUEST_CREATION_TIME: + if (value == null) { + unsetRequestCreationTime(); + } else { + setRequestCreationTime((Long)value); + } + break; - case REQUESTER_USERNAME: - if (value == null) { - unsetRequesterUsername(); - } else { - setRequesterUsername((String)value); - } - break; + case REQUESTER_USERNAME: + if (value == null) { + unsetRequesterUsername(); + } else { + setRequesterUsername((String)value); + } + break; } } public Object getFieldValue(_Fields field) { switch (field) { - case AIRAVATA_INTERNAL_GATEWAY_ID: - return getAiravataInternalGatewayId(); + case AIRAVATA_INTERNAL_GATEWAY_ID: + return getAiravataInternalGatewayId(); - case GATEWAY_ID: - return getGatewayId(); + case GATEWAY_ID: + return getGatewayId(); - case GATEWAY_APPROVAL_STATUS: - return getGatewayApprovalStatus(); + case GATEWAY_APPROVAL_STATUS: + return getGatewayApprovalStatus(); - case GATEWAY_NAME: - return getGatewayName(); + case GATEWAY_NAME: + return getGatewayName(); - case DOMAIN: - return getDomain(); + case DOMAIN: + return getDomain(); - case EMAIL_ADDRESS: - return getEmailAddress(); + case EMAIL_ADDRESS: + return getEmailAddress(); - case GATEWAY_ACRONYM: - return getGatewayAcronym(); + case GATEWAY_ACRONYM: + return getGatewayAcronym(); - case GATEWAY_URL: - return getGatewayURL(); + case GATEWAY_URL: + return getGatewayURL(); - case GATEWAY_PUBLIC_ABSTRACT: - return getGatewayPublicAbstract(); + case GATEWAY_PUBLIC_ABSTRACT: + return getGatewayPublicAbstract(); - case REVIEW_PROPOSAL_DESCRIPTION: - return getReviewProposalDescription(); + case REVIEW_PROPOSAL_DESCRIPTION: + return getReviewProposalDescription(); - case GATEWAY_ADMIN_FIRST_NAME: - return getGatewayAdminFirstName(); + case GATEWAY_ADMIN_FIRST_NAME: + return getGatewayAdminFirstName(); - case GATEWAY_ADMIN_LAST_NAME: - return getGatewayAdminLastName(); + case GATEWAY_ADMIN_LAST_NAME: + return getGatewayAdminLastName(); - case GATEWAY_ADMIN_EMAIL: - return getGatewayAdminEmail(); + case GATEWAY_ADMIN_EMAIL: + return getGatewayAdminEmail(); - case IDENTITY_SERVER_USER_NAME: - return getIdentityServerUserName(); + case IDENTITY_SERVER_USER_NAME: + return getIdentityServerUserName(); - case IDENTITY_SERVER_PASSWORD_TOKEN: - return getIdentityServerPasswordToken(); + case IDENTITY_SERVER_PASSWORD_TOKEN: + return getIdentityServerPasswordToken(); - case DECLINED_REASON: - return getDeclinedReason(); + case DECLINED_REASON: + return getDeclinedReason(); - case OAUTH_CLIENT_ID: - return getOauthClientId(); + case OAUTH_CLIENT_ID: + return getOauthClientId(); - case OAUTH_CLIENT_SECRET: - return getOauthClientSecret(); + case OAUTH_CLIENT_SECRET: + return getOauthClientSecret(); - case REQUEST_CREATION_TIME: - return getRequestCreationTime(); + case REQUEST_CREATION_TIME: + return getRequestCreationTime(); - case REQUESTER_USERNAME: - return getRequesterUsername(); + case REQUESTER_USERNAME: + return getRequesterUsername(); } throw new IllegalStateException(); @@ -1108,46 +1084,46 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields } switch (field) { - case AIRAVATA_INTERNAL_GATEWAY_ID: - return isSetAiravataInternalGatewayId(); - case GATEWAY_ID: - return isSetGatewayId(); - case GATEWAY_APPROVAL_STATUS: - return isSetGatewayApprovalStatus(); - case GATEWAY_NAME: - return isSetGatewayName(); - case DOMAIN: - return isSetDomain(); - case EMAIL_ADDRESS: - return isSetEmailAddress(); - case GATEWAY_ACRONYM: - return isSetGatewayAcronym(); - case GATEWAY_URL: - return isSetGatewayURL(); - case GATEWAY_PUBLIC_ABSTRACT: - return isSetGatewayPublicAbstract(); - case REVIEW_PROPOSAL_DESCRIPTION: - return isSetReviewProposalDescription(); - case GATEWAY_ADMIN_FIRST_NAME: - return isSetGatewayAdminFirstName(); - case GATEWAY_ADMIN_LAST_NAME: - return isSetGatewayAdminLastName(); - case GATEWAY_ADMIN_EMAIL: - return isSetGatewayAdminEmail(); - case IDENTITY_SERVER_USER_NAME: - return isSetIdentityServerUserName(); - case IDENTITY_SERVER_PASSWORD_TOKEN: - return isSetIdentityServerPasswordToken(); - case DECLINED_REASON: - return isSetDeclinedReason(); - case OAUTH_CLIENT_ID: - return isSetOauthClientId(); - case OAUTH_CLIENT_SECRET: - return isSetOauthClientSecret(); - case REQUEST_CREATION_TIME: - return isSetRequestCreationTime(); - case REQUESTER_USERNAME: - return isSetRequesterUsername(); + case AIRAVATA_INTERNAL_GATEWAY_ID: + return isSetAiravataInternalGatewayId(); + case GATEWAY_ID: + return isSetGatewayId(); + case GATEWAY_APPROVAL_STATUS: + return isSetGatewayApprovalStatus(); + case GATEWAY_NAME: + return isSetGatewayName(); + case DOMAIN: + return isSetDomain(); + case EMAIL_ADDRESS: + return isSetEmailAddress(); + case GATEWAY_ACRONYM: + return isSetGatewayAcronym(); + case GATEWAY_URL: + return isSetGatewayURL(); + case GATEWAY_PUBLIC_ABSTRACT: + return isSetGatewayPublicAbstract(); + case REVIEW_PROPOSAL_DESCRIPTION: + return isSetReviewProposalDescription(); + case GATEWAY_ADMIN_FIRST_NAME: + return isSetGatewayAdminFirstName(); + case GATEWAY_ADMIN_LAST_NAME: + return isSetGatewayAdminLastName(); + case GATEWAY_ADMIN_EMAIL: + return isSetGatewayAdminEmail(); + case IDENTITY_SERVER_USER_NAME: + return isSetIdentityServerUserName(); + case IDENTITY_SERVER_PASSWORD_TOKEN: + return isSetIdentityServerPasswordToken(); + case DECLINED_REASON: + return isSetDeclinedReason(); + case OAUTH_CLIENT_ID: + return isSetOauthClientId(); + case OAUTH_CLIENT_SECRET: + return isSetOauthClientSecret(); + case REQUEST_CREATION_TIME: + return isSetRequestCreationTime(); + case REQUESTER_USERNAME: + return isSetRequesterUsername(); } throw new IllegalStateException(); } @@ -1880,12 +1856,14 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields public void validate() throws org.apache.thrift.TException { // check for required fields - if (gatewayId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); + if (!isSetGatewayId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString()); } - if (gatewayApprovalStatus == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayApprovalStatus' was not present! Struct: " + toString()); + + if (!isSetGatewayApprovalStatus()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayApprovalStatus' is unset! Struct:" + toString()); } + // check for sub-struct validity } @@ -1921,7 +1899,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -1929,7 +1907,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.airavataInternalGatewayId = iprot.readString(); struct.setAiravataInternalGatewayIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1937,7 +1915,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1945,7 +1923,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.gatewayApprovalStatus = org.apache.airavata.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32()); struct.setGatewayApprovalStatusIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1953,7 +1931,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayName = iprot.readString(); struct.setGatewayNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1961,7 +1939,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.domain = iprot.readString(); struct.setDomainIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1969,7 +1947,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.emailAddress = iprot.readString(); struct.setEmailAddressIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1977,7 +1955,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayAcronym = iprot.readString(); struct.setGatewayAcronymIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1985,7 +1963,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayURL = iprot.readString(); struct.setGatewayURLIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -1993,7 +1971,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayPublicAbstract = iprot.readString(); struct.setGatewayPublicAbstractIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2001,7 +1979,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.reviewProposalDescription = iprot.readString(); struct.setReviewProposalDescriptionIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2009,7 +1987,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayAdminFirstName = iprot.readString(); struct.setGatewayAdminFirstNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2017,7 +1995,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayAdminLastName = iprot.readString(); struct.setGatewayAdminLastNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2025,7 +2003,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayAdminEmail = iprot.readString(); struct.setGatewayAdminEmailIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2033,7 +2011,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.identityServerUserName = iprot.readString(); struct.setIdentityServerUserNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2041,7 +2019,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.identityServerPasswordToken = iprot.readString(); struct.setIdentityServerPasswordTokenIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2049,7 +2027,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.declinedReason = iprot.readString(); struct.setDeclinedReasonIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2057,7 +2035,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.oauthClientId = iprot.readString(); struct.setOauthClientIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2065,7 +2043,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.oauthClientSecret = iprot.readString(); struct.setOauthClientSecretIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2073,7 +2051,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.requestCreationTime = iprot.readI64(); struct.setRequestCreationTimeIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2081,7 +2059,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requesterUsername = iprot.readString(); struct.setRequesterUsernameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -2091,8 +2069,6 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields iprot.readFieldEnd(); } iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
