Class: Apcera::Binding

Inherits:
BaseObject show all
Defined in:
lib/apcera/models/binding.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, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Binding

Returns a new instance of Binding.



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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/apcera/models/binding.rb', line 71

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[:'env_var']
    if (value = attributes[:'env_var']).is_a?(Array)
      self.env_var = value
    end
  end
  
  if attributes[:'fqn']
    self.fqn = attributes[:'fqn']
  end
  
  if attributes[:'job_fqn']
    self.job_fqn = attributes[:'job_fqn']
  end
  
  if attributes[:'name']
    self.name = attributes[:'name']
  end
  
  if attributes[:'parameters']
    if (value = attributes[:'parameters']).is_a?(Array)
      self.parameters = value
    end
  end
  
  if attributes[:'provider_fqn']
    self.provider_fqn = attributes[:'provider_fqn']
  end
  
  if attributes[:'service_fqn']
    self.service_fqn = attributes[:'service_fqn']
  end
  
  if attributes[:'target_job_bound_ip']
    self.target_job_bound_ip = attributes[:'target_job_bound_ip']
  end
  
  if attributes[:'target_job_bound_port']
    self.target_job_bound_port = attributes[:'target_job_bound_port']
  end
  
  if attributes[:'target_job_fqn']
    self.target_job_fqn = attributes[:'target_job_fqn']
  end
  
  if attributes[:'target_job_port']
    self.target_job_port = attributes[:'target_job_port']
  end
  
  if attributes[:'target_job_uuid']
    self.target_job_uuid = attributes[:'target_job_uuid']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end

Instance Attribute Details

#env_varObject

Returns the value of attribute env_var.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def env_var
  @env_var
end

#fqnObject

Returns the value of attribute fqn.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def fqn
  @fqn
end

#job_fqnObject

Returns the value of attribute job_fqn.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def job_fqn
  @job_fqn
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def name
  @name
end

#parametersObject

Returns the value of attribute parameters.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def parameters
  @parameters
end

#provider_fqnObject

Returns the value of attribute provider_fqn.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def provider_fqn
  @provider_fqn
end

#service_fqnObject

Returns the value of attribute service_fqn.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def service_fqn
  @service_fqn
end

#target_job_bound_ipObject

Returns the value of attribute target_job_bound_ip.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def target_job_bound_ip
  @target_job_bound_ip
end

#target_job_bound_portObject

Returns the value of attribute target_job_bound_port.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def target_job_bound_port
  @target_job_bound_port
end

#target_job_fqnObject

Returns the value of attribute target_job_fqn.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def target_job_fqn
  @target_job_fqn
end

#target_job_portObject

Returns the value of attribute target_job_port.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def target_job_port
  @target_job_port
end

#target_job_uuidObject

Returns the value of attribute target_job_uuid.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def target_job_uuid
  @target_job_uuid
end

#uuidObject

Returns the value of attribute uuid.



4
5
6
# File 'lib/apcera/models/binding.rb', line 4

def uuid
  @uuid
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
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/apcera/models/binding.rb', line 6

def self.attribute_map
  {
    
    # List of environment variables generated for the binding.
    :'env_var' => :'env_var',
    
    # The binding's fully-qualified name.
    :'fqn' => :'fqn',
    
    # Fully-qualified name of the job that is bound to another job or service.
    :'job_fqn' => :'job_fqn',
    
    # The base name of the binding.
    :'name' => :'name',
    
    # A map of custom binding parameter names to their values.
    :'parameters' => :'parameters',
    
    # Fully-qualified name of the provider used to create the service to which the source job is bound. Only relevant for job-to-service bindings.
    :'provider_fqn' => :'provider_fqn',
    
    # Fully-qualified name of a the service to which the source job is bound. Only relevant for for job-to-service bindings.
    :'service_fqn' => :'service_fqn',
    
    # IP address where the connection to the target job should be exposed.
    :'target_job_bound_ip' => :'target_job_bound_ip',
    
    # Port that the target job should be exposed at.
    :'target_job_bound_port' => :'target_job_bound_port',
    
    # Fully-qualified name of the job to which the source job wants to bind (input only).
    :'target_job_fqn' => :'target_job_fqn',
    
    # Port on the target job that the source job wants to bind to.
    :'target_job_port' => :'target_job_port',
    
    # UUID of the job to which the source job is bound (output only).
    :'target_job_uuid' => :'target_job_uuid',
    
    # The binding's unique identifier.
    :'uuid' => :'uuid'
    
  }
end

.swagger_typesObject

attribute type



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/apcera/models/binding.rb', line 52

def self.swagger_types
  {
    :'env_var' => :'Array<String>',
    :'fqn' => :'String',
    :'job_fqn' => :'String',
    :'name' => :'String',
    :'parameters' => :'Hash<String, String>',
    :'provider_fqn' => :'String',
    :'service_fqn' => :'String',
    :'target_job_bound_ip' => :'String',
    :'target_job_bound_port' => :'String',
    :'target_job_fqn' => :'String',
    :'target_job_port' => :'String',
    :'target_job_uuid' => :'String',
    :'uuid' => :'String'
    
  }
end