incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/4] Commiting generated code from Thrift api change.
Date Wed, 01 Oct 2014 13:56:34 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb44fa50/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
index 507b231..904a30d 100644
--- a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
+++ b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
@@ -4782,6 +4782,100 @@ sub write {
   return $xfer;
 }
 
+package Blur::ArgumentDescriptor;
+use base qw(Class::Accessor);
+Blur::ArgumentDescriptor->mk_accessors( qw( name type description ) );
+
+sub new {
+  my $classname = shift;
+  my $self      = {};
+  my $vals      = shift || {};
+  $self->{name} = undef;
+  $self->{type} = undef;
+  $self->{description} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{name}) {
+      $self->{name} = $vals->{name};
+    }
+    if (defined $vals->{type}) {
+      $self->{type} = $vals->{type};
+    }
+    if (defined $vals->{description}) {
+      $self->{description} = $vals->{description};
+    }
+  }
+  return bless ($self, $classname);
+}
+
+sub getName {
+  return 'ArgumentDescriptor';
+}
+
+sub read {
+  my ($self, $input) = @_;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{name});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{type});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{description});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my ($self, $output) = @_;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ArgumentDescriptor');
+  if (defined $self->{name}) {
+    $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+    $xfer += $output->writeString($self->{name});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{type}) {
+    $xfer += $output->writeFieldBegin('type', TType::STRING, 2);
+    $xfer += $output->writeString($self->{type});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{description}) {
+    $xfer += $output->writeFieldBegin('description', TType::STRING, 3);
+    $xfer += $output->writeString($self->{description});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
 package Blur::CommandDescriptor;
 use base qw(Class::Accessor);
 Blur::CommandDescriptor->mk_accessors( qw( commandName description requiredArguments optionalArguments
returnType version ) );
@@ -4860,9 +4954,10 @@ sub read {
           for (my $_i244 = 0; $_i244 < $_size240; ++$_i244)
           {
             my $key245 = '';
-            my $val246 = '';
+            my $val246 = new Blur::ArgumentDescriptor();
             $xfer += $input->readString(\$key245);
-            $xfer += $input->readString(\$val246);
+            $val246 = new Blur::ArgumentDescriptor();
+            $xfer += $val246->read($input);
             $self->{requiredArguments}->{$key245} = $val246;
           }
           $xfer += $input->readMapEnd();
@@ -4881,9 +4976,10 @@ sub read {
           for (my $_i251 = 0; $_i251 < $_size247; ++$_i251)
           {
             my $key252 = '';
-            my $val253 = '';
+            my $val253 = new Blur::ArgumentDescriptor();
             $xfer += $input->readString(\$key252);
-            $xfer += $input->readString(\$val253);
+            $val253 = new Blur::ArgumentDescriptor();
+            $xfer += $val253->read($input);
             $self->{optionalArguments}->{$key252} = $val253;
           }
           $xfer += $input->readMapEnd();
@@ -4929,12 +5025,12 @@ sub write {
   if (defined $self->{requiredArguments}) {
     $xfer += $output->writeFieldBegin('requiredArguments', TType::MAP, 3);
     {
-      $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{requiredArguments}}));
+      $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{requiredArguments}}));
       {
         while( my ($kiter254,$viter255) = each %{$self->{requiredArguments}}) 
         {
           $xfer += $output->writeString($kiter254);
-          $xfer += $output->writeString($viter255);
+          $xfer += ${viter255}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -4944,12 +5040,12 @@ sub write {
   if (defined $self->{optionalArguments}) {
     $xfer += $output->writeFieldBegin('optionalArguments', TType::MAP, 4);
     {
-      $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{optionalArguments}}));
+      $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{optionalArguments}}));
       {
         while( my ($kiter256,$viter257) = each %{$self->{optionalArguments}}) 
         {
           $xfer += $output->writeString($kiter256);
-          $xfer += $output->writeString($viter257);
+          $xfer += ${viter257}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb44fa50/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
index 6222316..dedac6c 100644
--- a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
+++ b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
@@ -1213,6 +1213,26 @@ module Blur
     ::Thrift::Struct.generate_accessors self
   end
 
+  class ArgumentDescriptor
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    NAME = 1
+    TYPE = 2
+    DESCRIPTION = 3
+
+    FIELDS = {
+      NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
+      TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'},
+      DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
   class CommandDescriptor
     include ::Thrift::Struct, ::Thrift::Struct_Union
     COMMANDNAME = 1
@@ -1225,8 +1245,8 @@ module Blur
     FIELDS = {
       COMMANDNAME => {:type => ::Thrift::Types::STRING, :name => 'commandName'},
       DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'},
-      REQUIREDARGUMENTS => {:type => ::Thrift::Types::MAP, :name => 'requiredArguments',
:key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
-      OPTIONALARGUMENTS => {:type => ::Thrift::Types::MAP, :name => 'optionalArguments',
:key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
+      REQUIREDARGUMENTS => {:type => ::Thrift::Types::MAP, :name => 'requiredArguments',
:key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT,
:class => ::Blur::ArgumentDescriptor}},
+      OPTIONALARGUMENTS => {:type => ::Thrift::Types::MAP, :name => 'optionalArguments',
:key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT,
:class => ::Blur::ArgumentDescriptor}},
       RETURNTYPE => {:type => ::Thrift::Types::STRING, :name => 'returnType'},
       VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}
     }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb44fa50/docs/Blur.html
----------------------------------------------------------------------
diff --git a/docs/Blur.html b/docs/Blur.html
index 488ef0b..121e460 100644
--- a/docs/Blur.html
+++ b/docs/Blur.html
@@ -105,6 +105,7 @@ limitations under the License.
 <li><a href="#Struct_Response">Response</a></li>
 <li><a href="#Struct_Arguments">Arguments</a></li>
 <li><a href="#Struct_CommandStatus">CommandStatus</a></li>
+<li><a href="#Struct_ArgumentDescriptor">ArgumentDescriptor</a></li>
 <li><a href="#Struct_CommandDescriptor">CommandDescriptor</a></li>
 </ul>
 </li>
@@ -714,12 +715,17 @@ be family dot column, "family.column".
 <tr><td>3</td><td>commandName</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
 <tr><td>4</td><td>arguments</td><td><code><a
href="Blur.html#Struct_Arguments">Arguments</a></code></td><td></td><td>default</td><td></td></tr>
 <tr><td>5</td><td>state</td><td><code><a href="Blur.html#Enum_CommandStatusState">CommandStatusState</a></code></td><td></td><td>default</td><td></td></tr>
+</table><br/></p></section><section><div class="page-header"><h3
id="Struct_ArgumentDescriptor">Struct: ArgumentDescriptor</h3></div><p class="lead">
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
+<tr><td>1</td><td>name</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>2</td><td>type</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>3</td><td>description</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
 </table><br/></p></section><section><div class="page-header"><h3
id="Struct_CommandDescriptor">Struct: CommandDescriptor</h3></div><p class="lead">
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
 <tr><td>1</td><td>commandName</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
 <tr><td>2</td><td>description</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
-<tr><td>3</td><td>requiredArguments</td><td><code>map&lt;<code>string</code>,
<code>string</code>&gt;</code></td><td></td><td>default</td><td></td></tr>
-<tr><td>4</td><td>optionalArguments</td><td><code>map&lt;<code>string</code>,
<code>string</code>&gt;</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>3</td><td>requiredArguments</td><td><code>map&lt;<code>string</code>,
<code><a href="Blur.html#Struct_ArgumentDescriptor">ArgumentDescriptor</a></code>&gt;</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>4</td><td>optionalArguments</td><td><code>map&lt;<code>string</code>,
<code><a href="Blur.html#Struct_ArgumentDescriptor">ArgumentDescriptor</a></code>&gt;</code></td><td></td><td>default</td><td></td></tr>
 <tr><td>5</td><td>returnType</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
 <tr><td>6</td><td>version</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
 </table><br/></p></section><hr/><h2 id="Services">Services</h2>


Mime
View raw message