Class: Quark::MdkIntrospection::DatawireToken
Constant Summary
DatawireQuarkCore::Static::Unassigned
Class Method Summary
collapse
Instance Method Summary
collapse
_lazy_statics, static, unlazy_statics
#to_s
Constructor Details
63
64
65
66
67
|
# File 'lib/mdk_introspection.rb', line 63
def initialize()
self.__init_fields__
nil
end
|
Class Method Details
.getToken(env) ⇒ Object
Returns the Datawire Access Token by reading the environment variable DATAWIRE_TOKEN.
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/mdk_introspection.rb', line 75
def self.getToken(env)
token = env.var(::Quark.mdk_introspection.DatawireToken.TOKEN_VARIABLE_NAME).get()
if ((token) == (nil))
::Quark.quark.concurrent.Context.runtime().fail("Neither 'MDK_DISCOVERY_SOURCE' nor 'DATAWIRE_TOKEN' are set. Either set the former to an existing discovery source (e.g. 'synapse:path=/synapse/output_files/'), or use the Datawire cloud services. For the latter please visit https://app.datawire.io/#/signup to create a free account and get a token.")
end
return token
nil
end
|
Instance Method Details
#__init_fields__ ⇒ Object
112
113
114
115
116
|
# File 'lib/mdk_introspection.rb', line 112
def __init_fields__()
nil
end
|
#_getClass ⇒ Object
86
87
88
89
90
91
|
# File 'lib/mdk_introspection.rb', line 86
def _getClass()
return "mdk_introspection.DatawireToken"
nil
end
|
#_getField(name) ⇒ Object
93
94
95
96
97
98
99
100
101
|
# File 'lib/mdk_introspection.rb', line 93
def _getField(name)
if ((name) == ("TOKEN_VARIABLE_NAME"))
return ::Quark.mdk_introspection.DatawireToken.TOKEN_VARIABLE_NAME
end
return nil
nil
end
|
#_setField(name, value) ⇒ Object
103
104
105
106
107
108
109
110
|
# File 'lib/mdk_introspection.rb', line 103
def _setField(name, value)
if ((name) == ("TOKEN_VARIABLE_NAME"))
::Quark.mdk_introspection.DatawireToken.TOKEN_VARIABLE_NAME = ::DatawireQuarkCore.cast(value) { ::String }
end
nil
end
|