lib/saklient/cloud/resources/swytch.rb
# (This method is generated in Translator_default#buildImpl)
#
# @param [any] r
(This method is generated in Translator_default#buildImpl)
( This method is generated in Translator_default#buildImpl )
def api_deserialize_impl(r)
          @is_new = (r).nil?
          r = {} if @is_new
          @is_incomplete = false
          if Saklient::Util::exists_path(r, 'ID')
            @m_id = (Saklient::Util::get_by_path(r, 'ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'ID').to_s
          else
            @m_id = nil
            @is_incomplete = true
          end
          @n_id = false
          if Saklient::Util::exists_path(r, 'Name')
            @m_name = (Saklient::Util::get_by_path(r, 'Name')).nil? ? nil : Saklient::Util::get_by_path(r, 'Name').to_s
          else
            @m_name = nil
            @is_incomplete = true
          end
          @n_name = false
          if Saklient::Util::exists_path(r, 'Description')
            @m_description = (Saklient::Util::get_by_path(r, 'Description')).nil? ? nil : Saklient::Util::get_by_path(r, 'Description').to_s
          else
            @m_description = nil
            @is_incomplete = true
          end
          @n_description = false
          if Saklient::Util::exists_path(r, 'Tags')
            if (Saklient::Util::get_by_path(r, 'Tags')).nil?
              @m_tags = []
            else
              @m_tags = []
              for t in Saklient::Util::get_by_path(r, 'Tags')
                v1 = nil
                v1 = (t).nil? ? nil : t.to_s
                @m_tags << v1
              end
            end
          else
            @m_tags = nil
            @is_incomplete = true
          end
          @n_tags = false
          if Saklient::Util::exists_path(r, 'Icon')
            @m_icon = (Saklient::Util::get_by_path(r, 'Icon')).nil? ? nil : Saklient::Cloud::Resources::Icon.new(@_client, Saklient::Util::get_by_path(r, 'Icon'))
          else
            @m_icon = nil
            @is_incomplete = true
          end
          @n_icon = false
          if Saklient::Util::exists_path(r, 'UserSubnet.DefaultRoute')
            @m_user_default_route = (Saklient::Util::get_by_path(r, 'UserSubnet.DefaultRoute')).nil? ? nil : Saklient::Util::get_by_path(r, 'UserSubnet.DefaultRoute').to_s
          else
            @m_user_default_route = nil
            @is_incomplete = true
          end
          @n_user_default_route = false
          if Saklient::Util::exists_path(r, 'UserSubnet.NetworkMaskLen')
            @m_user_mask_len = (Saklient::Util::get_by_path(r, 'UserSubnet.NetworkMaskLen')).nil? ? nil : (Saklient::Util::get_by_path(r, 'UserSubnet.NetworkMaskLen').to_s).to_s().to_i(10)
          else
            @m_user_mask_len = nil
            @is_incomplete = true
          end
          @n_user_mask_len = false
          if Saklient::Util::exists_path(r, 'Internet')
            @m_router = (Saklient::Util::get_by_path(r, 'Internet')).nil? ? nil : Saklient::Cloud::Resources::Router.new(@_client, Saklient::Util::get_by_path(r, 'Internet'))
          else
            @m_router = nil
            @is_incomplete = true
          end
          @n_router = false
          if Saklient::Util::exists_path(r, 'Bridge')
            @m_bridge = (Saklient::Util::get_by_path(r, 'Bridge')).nil? ? nil : Saklient::Cloud::Resources::Bridge.new(@_client, Saklient::Util::get_by_path(r, 'Bridge'))
          else
            @m_bridge = nil
            @is_incomplete = true
          end
          @n_bridge = false
          if Saklient::Util::exists_path(r, 'Subnets')
            if (Saklient::Util::get_by_path(r, 'Subnets')).nil?
              @m_ipv4_nets = []
            else
              @m_ipv4_nets = []
              for t in Saklient::Util::get_by_path(r, 'Subnets')
                v2 = nil
                v2 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv4Net.new(@_client, t)
                @m_ipv4_nets << v2
              end
            end
          else
            @m_ipv4_nets = nil
            @is_incomplete = true
          end
          @n_ipv4_nets = false
          if Saklient::Util::exists_path(r, 'IPv6Nets')
            if (Saklient::Util::get_by_path(r, 'IPv6Nets')).nil?
              @m_ipv6_nets = []
            else
              @m_ipv6_nets = []
              for t in Saklient::Util::get_by_path(r, 'IPv6Nets')
                v3 = nil
                v3 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv6Net.new(@_client, t)
                @m_ipv6_nets << v3
              end
            end
          else
            @m_ipv6_nets = nil
            @is_incomplete = true
          end
          @n_ipv6_nets = false
        end
def api_deserialize_impl ( r ) @is_new = ( r ) . nil? r = { } if @is_new @is_incomplete = false if Saklient :: Util :: exists_path ( r , 'ID' ) @m_id = ( Saklient :: Util :: get_by_path ( r , 'ID' ) ) . nil? ? nil : Saklient :: Util :: get_by_path ( r , 'ID' ) . to_s else @m_id = nil @is_incomplete = true end @n_id = false if Saklient :: Util :: exists_path ( r , 'Name' ) @m_name = ( Saklient :: Util :: get_by_path ( r , 'Name' ) ) . nil? ? nil : Saklient :: Util :: get_by_path ( r , 'Name' ) . to_s else @m_name = nil @is_incomplete = true end @n_name = false if Saklient :: Util :: exists_path ( r , 'Description' ) @m_description = ( Saklient :: Util :: get_by_path ( r , 'Description' ) ) . nil? ? nil : Saklient :: Util :: get_by_path ( r , 'Description' ) . to_s else @m_description = nil @is_incomplete = true end @n_description = false if Saklient :: Util :: exists_path ( r , 'Tags' ) if ( Saklient :: Util :: get_by_path ( r , 'Tags' ) ) . nil? @m_tags = [ ] else @m_tags = [ ] for t in Saklient :: Util :: get_by_path ( r , 'Tags' ) v1 = nil v1 = ( t ) . nil? ? nil : t . to_s @m_tags << v1 end end else @m_tags = nil @is_incomplete = true end @n_tags = false if Saklient :: Util :: exists_path ( r , 'Icon' ) @m_icon = ( Saklient :: Util :: get_by_path ( r , 'Icon' ) ) . nil? ? nil : Saklient :: Cloud :: Resources :: Icon . new ( @_client , Saklient :: Util :: get_by_path ( r , 'Icon' ) ) else @m_icon = nil @is_incomplete = true end @n_icon = false if Saklient :: Util :: exists_path ( r , 'UserSubnet.DefaultRoute' ) @m_user_default_route = ( Saklient :: Util :: get_by_path ( r , 'UserSubnet.DefaultRoute' ) ) . nil? ? nil : Saklient :: Util :: get_by_path ( r , 'UserSubnet.DefaultRoute' ) . to_s else @m_user_default_route = nil @is_incomplete = true end @n_user_default_route = false if Saklient :: Util :: exists_path ( r , 'UserSubnet.NetworkMaskLen' ) @m_user_mask_len = ( Saklient :: Util :: get_by_path ( r , 'UserSubnet.NetworkMaskLen' ) ) . nil? ? nil : ( Saklient :: Util :: get_by_path ( r , 'UserSubnet.NetworkMaskLen' ) . to_s ) . to_s ( ) . to_i ( 10 ) else @m_user_mask_len = nil @is_incomplete = true end @n_user_mask_len = false if Saklient :: Util :: exists_path ( r , 'Internet' ) @m_router = ( Saklient :: Util :: get_by_path ( r , 'Internet' ) ) . nil? ? nil : Saklient :: Cloud :: Resources :: Router . new ( @_client , Saklient :: Util :: get_by_path ( r , 'Internet' ) ) else @m_router = nil @is_incomplete = true end @n_router = false if Saklient :: Util :: exists_path ( r , 'Bridge' ) @m_bridge = ( Saklient :: Util :: get_by_path ( r , 'Bridge' ) ) . nil? ? nil : Saklient :: Cloud :: Resources :: Bridge . new ( @_client , Saklient :: Util :: get_by_path ( r , 'Bridge' ) ) else @m_bridge = nil @is_incomplete = true end @n_bridge = false if Saklient :: Util :: exists_path ( r , 'Subnets' ) if ( Saklient :: Util :: get_by_path ( r , 'Subnets' ) ) . nil? @m_ipv4_nets = [ ] else @m_ipv4_nets = [ ] for t in Saklient :: Util :: get_by_path ( r , 'Subnets' ) v2 = nil v2 = ( t ) . nil? ? nil : Saklient :: Cloud :: Resources :: Ipv4Net . new ( @_client , t ) @m_ipv4_nets << v2 end end else @m_ipv4_nets = nil @is_incomplete = true end @n_ipv4_nets = false if Saklient :: Util :: exists_path ( r , 'IPv6Nets' ) if ( Saklient :: Util :: get_by_path ( r , 'IPv6Nets' ) ) . nil? @m_ipv6_nets = [ ] else @m_ipv6_nets = [ ] for t in Saklient :: Util :: get_by_path ( r , 'IPv6Nets' ) v3 = nil v3 = ( t ) . nil? ? nil : Saklient :: Cloud :: Resources :: Ipv6Net . new ( @_client , t ) @m_ipv6_nets << v3 end end else @m_ipv6_nets = nil @is_incomplete = true end @n_ipv6_nets = false end
(This method is generated in Translator_default#buildImpl)
( This method is generated in Translator_default#buildImpl )
r
<not_specific>
<not_specific>
None