You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2015/11/12 19:08:35 UTC
airavata git commit: generated php for storage resource
Repository: airavata
Updated Branches:
refs/heads/develop f6d96515f -> 0a0f5ba6b
generated php for storage resource
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0a0f5ba6
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0a0f5ba6
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0a0f5ba6
Branch: refs/heads/develop
Commit: 0a0f5ba6b26e08792d19f2c8df5418e9b1ae99b9
Parents: f6d9651
Author: smarru <sm...@apache.org>
Authored: Thu Nov 12 13:08:30 2015 -0500
Committer: smarru <sm...@apache.org>
Committed: Thu Nov 12 13:08:30 2015 -0500
----------------------------------------------------------------------
.../Model/AppCatalog/StorageResource/Types.php | 232 +++++++++++++++++++
.../src/main/resources/lib/Types.php | 20 ++
2 files changed, 252 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0a0f5ba6/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/StorageResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/StorageResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/StorageResource/Types.php
new file mode 100644
index 0000000..0cf3227
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/StorageResource/Types.php
@@ -0,0 +1,232 @@
+<?php
+namespace Airavata\Model\AppCatalog\StorageResource;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+/**
+ * Storage Resource Description
+ *
+ * storageResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource.
+ *
+ * hostName:
+ * Fully Qualified Host Name.
+ *
+ * storageResourceDescription:
+ * A user friendly description of the resource.
+ *
+ *
+ * DataMovementProtocol:
+ * Option to specify a prefered data movement mechanism of the available options.
+ *
+ *
+ */
+class StorageResourceDescription {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $storageResourceId = "DO_NOT_SET_AT_CLIENTS";
+ /**
+ * @var string
+ */
+ public $hostName = null;
+ /**
+ * @var string
+ */
+ public $storageResourceDescription = null;
+ /**
+ * @var bool
+ */
+ public $enabled = null;
+ /**
+ * @var \Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface[]
+ */
+ public $dataMovementInterfaces = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'storageResourceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'hostName',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'storageResourceDescription',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'enabled',
+ 'type' => TType::BOOL,
+ ),
+ 5 => array(
+ 'var' => 'dataMovementInterfaces',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['storageResourceId'])) {
+ $this->storageResourceId = $vals['storageResourceId'];
+ }
+ if (isset($vals['hostName'])) {
+ $this->hostName = $vals['hostName'];
+ }
+ if (isset($vals['storageResourceDescription'])) {
+ $this->storageResourceDescription = $vals['storageResourceDescription'];
+ }
+ if (isset($vals['enabled'])) {
+ $this->enabled = $vals['enabled'];
+ }
+ if (isset($vals['dataMovementInterfaces'])) {
+ $this->dataMovementInterfaces = $vals['dataMovementInterfaces'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'StorageResourceDescription';
+ }
+
+ 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::STRING) {
+ $xfer += $input->readString($this->storageResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->hostName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->storageResourceDescription);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->enabled);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::LST) {
+ $this->dataMovementInterfaces = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface();
+ $xfer += $elem5->read($input);
+ $this->dataMovementInterfaces []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } 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('StorageResourceDescription');
+ if ($this->storageResourceId !== null) {
+ $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->storageResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->hostName !== null) {
+ $xfer += $output->writeFieldBegin('hostName', TType::STRING, 2);
+ $xfer += $output->writeString($this->hostName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->storageResourceDescription !== null) {
+ $xfer += $output->writeFieldBegin('storageResourceDescription', TType::STRING, 3);
+ $xfer += $output->writeString($this->storageResourceDescription);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->enabled !== null) {
+ $xfer += $output->writeFieldBegin('enabled', TType::BOOL, 4);
+ $xfer += $output->writeBool($this->enabled);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dataMovementInterfaces !== null) {
+ if (!is_array($this->dataMovementInterfaces)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('dataMovementInterfaces', TType::LST, 5);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->dataMovementInterfaces));
+ {
+ foreach ($this->dataMovementInterfaces as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/0a0f5ba6/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
new file mode 100644
index 0000000..af5c5f4
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
@@ -0,0 +1,20 @@
+<?php
+namespace ;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+