Class: TranslationApiClient::TranslationStatus

Inherits:
BaseObject show all
Defined in:
lib/translationApi_client/models/translation_status.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ TranslationStatus

Returns a new instance of TranslationStatus.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/translationApi_client/models/translation_status.rb', line 55

def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'error']
    @error = attributes[:'error']
  end
  
  if attributes[:'cancelled']
    @cancelled = attributes[:'cancelled']
  end
  
  if attributes[:'createdAt']
    @created_at = attributes[:'createdAt']
  end
  
  if attributes[:'description']
    @description = attributes[:'description']
  end
  
  if attributes[:'expireAt']
    @expire_at = attributes[:'expireAt']
  end
  
  if attributes[:'finishedAt']
    @finished_at = attributes[:'finishedAt']
  end
  
  if attributes[:'finishedSteps']
    @finished_steps = attributes[:'finishedSteps']
  end
  
  if attributes[:'status']
    @status = attributes[:'status']
  end
  
  if attributes[:'totalSteps']
    @total_steps = attributes[:'totalSteps']
  end
  
end

Instance Attribute Details

#cancelledObject

Returns the value of attribute cancelled.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def cancelled
  @cancelled
end

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def description
  @description
end

#errorObject

Returns the value of attribute error.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def error
  @error
end

#expire_atObject

Returns the value of attribute expire_at.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def expire_at
  @expire_at
end

#finished_atObject

Returns the value of attribute finished_at.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def finished_at
  @finished_at
end

#finished_stepsObject

Returns the value of attribute finished_steps.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def finished_steps
  @finished_steps
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def status
  @status
end

#total_stepsObject

Returns the value of attribute total_steps.



4
5
6
# File 'lib/translationApi_client/models/translation_status.rb', line 4

def total_steps
  @total_steps
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/translationApi_client/models/translation_status.rb', line 6

def self.attribute_map
  {
    
    # Error of the request
    :'error' => :'error',
    
    # Is the request cancelled
    :'cancelled' => :'cancelled',
    
    # Creation time of the request (ms since the Epoch)
    :'created_at' => :'createdAt',
    
    # Description
    :'description' => :'description',
    
    # Expiration time of the request (ms since the Epoch)
    :'expire_at' => :'expireAt',
    
    # Completion time of the request (ms since the Epoch)
    :'finished_at' => :'finishedAt',
    
    # Number of finished steps
    :'finished_steps' => :'finishedSteps',
    
    # Status of the request
    :'status' => :'status',
    
    # Number of steps to complete
    :'total_steps' => :'totalSteps'
    
  }
end

.swagger_typesObject

attribute type



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/translationApi_client/models/translation_status.rb', line 40

def self.swagger_types
  {
    :'error' => :'string',
    :'cancelled' => :'boolean',
    :'created_at' => :'number',
    :'description' => :'string',
    :'expire_at' => :'number',
    :'finished_at' => :'number',
    :'finished_steps' => :'int',
    :'status' => :'string',
    :'total_steps' => :'int'
    
  }
end