body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def variable_mapping(self): '映射到官方ALBERT权重格式\n ' mapping = super(ALBERT_Unshared, self).variable_mapping() prefix = 'bert/encoder/transformer/group_0/inner_group_0/' for i in range(self.num_hidden_layers): mapping.update({('Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'attention_1/self/query/kernel'), (prefix + 'attention_1/self/query/bias'), (prefix + 'attention_1/self/key/kernel'), (prefix + 'attention_1/self/key/bias'), (prefix + 'attention_1/self/value/kernel'), (prefix + 'attention_1/self/value/bias'), (prefix + 'attention_1/output/dense/kernel'), (prefix + 'attention_1/output/dense/bias')], ('Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'LayerNorm/beta'), (prefix + 'LayerNorm/gamma')], ('Transformer-%d-FeedForward' % i): [(prefix + 'ffn_1/intermediate/dense/kernel'), (prefix + 'ffn_1/intermediate/dense/bias'), (prefix + 'ffn_1/intermediate/output/dense/kernel'), (prefix + 'ffn_1/intermediate/output/dense/bias')], ('Transformer-%d-FeedForward-Norm' % i): [(prefix + 'LayerNorm_1/beta'), (prefix + 'LayerNorm_1/gamma')]}) return mapping
-8,761,175,628,616,992,000
映射到官方ALBERT权重格式
bert4keras/models.py
variable_mapping
CurisZhou/bert4keras
python
def variable_mapping(self): '\n ' mapping = super(ALBERT_Unshared, self).variable_mapping() prefix = 'bert/encoder/transformer/group_0/inner_group_0/' for i in range(self.num_hidden_layers): mapping.update({('Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'attention_1/self/query/kernel'), (prefix + 'attention_1/self/query/bias'), (prefix + 'attention_1/self/key/kernel'), (prefix + 'attention_1/self/key/bias'), (prefix + 'attention_1/self/value/kernel'), (prefix + 'attention_1/self/value/bias'), (prefix + 'attention_1/output/dense/kernel'), (prefix + 'attention_1/output/dense/bias')], ('Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'LayerNorm/beta'), (prefix + 'LayerNorm/gamma')], ('Transformer-%d-FeedForward' % i): [(prefix + 'ffn_1/intermediate/dense/kernel'), (prefix + 'ffn_1/intermediate/dense/bias'), (prefix + 'ffn_1/intermediate/output/dense/kernel'), (prefix + 'ffn_1/intermediate/output/dense/bias')], ('Transformer-%d-FeedForward-Norm' % i): [(prefix + 'LayerNorm_1/beta'), (prefix + 'LayerNorm_1/gamma')]}) return mapping
def apply_embeddings(self, inputs): 'NEZHA的embedding是token、segment两者embedding之和\n ' inputs = inputs[:] x = inputs.pop(0) if (self.segment_vocab_size > 0): s = inputs.pop(0) z = self.layer_norm_conds[0] x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') if (self.segment_vocab_size > 0): if self.shared_segment_embeddings: name = 'Embedding-Token' else: name = 'Embedding-Segment' s = self.apply(inputs=s, layer=Embedding, input_dim=2, output_dim=self.embedding_size, embeddings_initializer=self.initializer, name=name) x = self.apply(inputs=[x, s], layer=Add, name='Embedding-Token-Segment') x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Embedding-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
-6,437,912,959,168,964,000
NEZHA的embedding是token、segment两者embedding之和
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): '\n ' inputs = inputs[:] x = inputs.pop(0) if (self.segment_vocab_size > 0): s = inputs.pop(0) z = self.layer_norm_conds[0] x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') if (self.segment_vocab_size > 0): if self.shared_segment_embeddings: name = 'Embedding-Token' else: name = 'Embedding-Segment' s = self.apply(inputs=s, layer=Embedding, input_dim=2, output_dim=self.embedding_size, embeddings_initializer=self.initializer, name=name) x = self.apply(inputs=[x, s], layer=Add, name='Embedding-Token-Segment') x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Embedding-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
def apply_main_layers(self, inputs, index): 'NEZHA的主体是基于Self-Attention的模块\n 顺序:Att --> Add --> LN --> FFN --> Add --> LN\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias(x) (xi, x) = (x, [x, x, x, position_bias]) arguments = {'a_bias': None, 'p_bias': 'typical_relative'} if (attention_mask is not None): arguments['a_bias'] = True x.insert(3, attention_mask) x = self.apply(inputs=x, layer=MultiHeadAttention, arguments=arguments, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) xi = x x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) return x
-8,805,266,312,876,407,000
NEZHA的主体是基于Self-Attention的模块 顺序:Att --> Add --> LN --> FFN --> Add --> LN
bert4keras/models.py
apply_main_layers
CurisZhou/bert4keras
python
def apply_main_layers(self, inputs, index): 'NEZHA的主体是基于Self-Attention的模块\n 顺序:Att --> Add --> LN --> FFN --> Add --> LN\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias(x) (xi, x) = (x, [x, x, x, position_bias]) arguments = {'a_bias': None, 'p_bias': 'typical_relative'} if (attention_mask is not None): arguments['a_bias'] = True x.insert(3, attention_mask) x = self.apply(inputs=x, layer=MultiHeadAttention, arguments=arguments, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) xi = x x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) return x
def compute_position_bias(self, inputs=None): '经典相对位置编码\n ' if (self.position_bias is None): x = inputs self.position_bias = self.apply(inputs=[x, x], layer=RelativePositionEmbedding, input_dim=((2 * 64) + 1), output_dim=self.attention_head_size, embeddings_initializer='Sinusoidal', name='Embedding-Relative-Position', trainable=False) return self.position_bias
7,472,666,155,821,153,000
经典相对位置编码
bert4keras/models.py
compute_position_bias
CurisZhou/bert4keras
python
def compute_position_bias(self, inputs=None): '\n ' if (self.position_bias is None): x = inputs self.position_bias = self.apply(inputs=[x, x], layer=RelativePositionEmbedding, input_dim=((2 * 64) + 1), output_dim=self.attention_head_size, embeddings_initializer='Sinusoidal', name='Embedding-Relative-Position', trainable=False) return self.position_bias
def load_variable(self, checkpoint, name): '加载单个变量的函数\n ' variable = super(ELECTRA, self).load_variable(checkpoint, name) if (name == 'electra/embeddings/word_embeddings'): return self.load_embeddings(variable) else: return variable
-8,873,225,075,302,833,000
加载单个变量的函数
bert4keras/models.py
load_variable
CurisZhou/bert4keras
python
def load_variable(self, checkpoint, name): '\n ' variable = super(ELECTRA, self).load_variable(checkpoint, name) if (name == 'electra/embeddings/word_embeddings'): return self.load_embeddings(variable) else: return variable
def apply_embeddings(self, inputs): 'GPT的embedding是token、position、segment三者embedding之和\n 跟BERT的主要区别是三者相加之后没有加LayerNormalization层。\n ' inputs = inputs[:] x = inputs.pop(0) if (self.segment_vocab_size > 0): s = inputs.pop(0) if self.custom_position_ids: p = inputs.pop(0) else: p = None x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') if (self.segment_vocab_size > 0): if self.shared_segment_embeddings: name = 'Embedding-Token' else: name = 'Embedding-Segment' s = self.apply(inputs=s, layer=Embedding, input_dim=self.segment_vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, name=name) x = self.apply(inputs=[x, s], layer=Add, name='Embedding-Token-Segment') x = self.apply(inputs=self.simplify([x, p]), layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, custom_position_ids=self.custom_position_ids, name='Embedding-Position') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
5,635,205,754,182,826,000
GPT的embedding是token、position、segment三者embedding之和 跟BERT的主要区别是三者相加之后没有加LayerNormalization层。
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): 'GPT的embedding是token、position、segment三者embedding之和\n 跟BERT的主要区别是三者相加之后没有加LayerNormalization层。\n ' inputs = inputs[:] x = inputs.pop(0) if (self.segment_vocab_size > 0): s = inputs.pop(0) if self.custom_position_ids: p = inputs.pop(0) else: p = None x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') if (self.segment_vocab_size > 0): if self.shared_segment_embeddings: name = 'Embedding-Token' else: name = 'Embedding-Segment' s = self.apply(inputs=s, layer=Embedding, input_dim=self.segment_vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, name=name) x = self.apply(inputs=[x, s], layer=Add, name='Embedding-Token-Segment') x = self.apply(inputs=self.simplify([x, p]), layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, custom_position_ids=self.custom_position_ids, name='Embedding-Position') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
def apply_final_layers(self, inputs): '剩余部分\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, arguments={'mode': 'dense'}, name='Embedding-Token') x = self.apply(inputs=x, layer=Activation, activation=self.final_activation, name='LM-Activation') return x
-2,088,572,238,631,069,200
剩余部分
bert4keras/models.py
apply_final_layers
CurisZhou/bert4keras
python
def apply_final_layers(self, inputs): '\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, arguments={'mode': 'dense'}, name='Embedding-Token') x = self.apply(inputs=x, layer=Activation, activation=self.final_activation, name='LM-Activation') return x
def load_variable(self, checkpoint, name): '加载单个变量的函数\n ' variable = super(GPT, self).load_variable(checkpoint, name) if (name == 'gpt/embeddings/word_embeddings'): return self.load_embeddings(variable) else: return variable
1,570,521,638,426,361,600
加载单个变量的函数
bert4keras/models.py
load_variable
CurisZhou/bert4keras
python
def load_variable(self, checkpoint, name): '\n ' variable = super(GPT, self).load_variable(checkpoint, name) if (name == 'gpt/embeddings/word_embeddings'): return self.load_embeddings(variable) else: return variable
def variable_mapping(self): '映射到TF版GPT权重格式\n ' mapping = super(GPT, self).variable_mapping() mapping = {k: [i.replace('bert/', 'gpt/').replace('encoder', 'transformer') for i in v] for (k, v) in mapping.items()} return mapping
-4,452,723,184,207,710,000
映射到TF版GPT权重格式
bert4keras/models.py
variable_mapping
CurisZhou/bert4keras
python
def variable_mapping(self): '\n ' mapping = super(GPT, self).variable_mapping() mapping = {k: [i.replace('bert/', 'gpt/').replace('encoder', 'transformer') for i in v] for (k, v) in mapping.items()} return mapping
def get_inputs(self): 'GPT2的输入是token_ids\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Input-Token') return x_in
-5,147,258,385,940,030,000
GPT2的输入是token_ids
bert4keras/models.py
get_inputs
CurisZhou/bert4keras
python
def get_inputs(self): '\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Input-Token') return x_in
def apply_embeddings(self, inputs): 'GPT2的embedding是token、position两者embedding之和\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, name='Embedding-Position') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
3,213,817,487,969,624,000
GPT2的embedding是token、position两者embedding之和
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): '\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, name='Embedding-Position') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
def apply_main_layers(self, inputs, index): 'GPT2的主体是基于Self-Attention的模块\n 顺序:LN --> Att --> Add --> LN --> FFN --> Add\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) x = self.apply(inputs=[x, x, x, attention_mask], layer=MultiHeadAttention, arguments={'a_bias': True}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return x
-7,313,988,763,362,563,000
GPT2的主体是基于Self-Attention的模块 顺序:LN --> Att --> Add --> LN --> FFN --> Add
bert4keras/models.py
apply_main_layers
CurisZhou/bert4keras
python
def apply_main_layers(self, inputs, index): 'GPT2的主体是基于Self-Attention的模块\n 顺序:LN --> Att --> Add --> LN --> FFN --> Add\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) x = self.apply(inputs=[x, x, x, attention_mask], layer=MultiHeadAttention, arguments={'a_bias': True}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return x
def apply_final_layers(self, inputs): '剩余部分\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Output-Dropout') x = super(GPT2, self).apply_final_layers(x) return x
6,606,056,578,758,226,000
剩余部分
bert4keras/models.py
apply_final_layers
CurisZhou/bert4keras
python
def apply_final_layers(self, inputs): '\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Output-Dropout') x = super(GPT2, self).apply_final_layers(x) return x
def variable_mapping(self): '映射到TF版GPT2权重格式\n ' mapping = super(GPT2, self).variable_mapping() mapping = {k: [i.replace('output/LayerNorm', 'input/LayerNorm') for i in v] for (k, v) in mapping.items()} mapping['Output-Norm'] = ['gpt/output/LayerNorm/beta', 'gpt/output/LayerNorm/gamma'] return mapping
-1,433,824,920,434,947,800
映射到TF版GPT2权重格式
bert4keras/models.py
variable_mapping
CurisZhou/bert4keras
python
def variable_mapping(self): '\n ' mapping = super(GPT2, self).variable_mapping() mapping = {k: [i.replace('output/LayerNorm', 'input/LayerNorm') for i in v] for (k, v) in mapping.items()} mapping['Output-Norm'] = ['gpt/output/LayerNorm/beta', 'gpt/output/LayerNorm/gamma'] return mapping
def get_inputs(self): 'GPT2_ML的输入是token_ids\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Input-Token') return x_in
4,213,046,444,150,288,000
GPT2_ML的输入是token_ids
bert4keras/models.py
get_inputs
CurisZhou/bert4keras
python
def get_inputs(self): '\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Input-Token') return x_in
def apply_embeddings(self, inputs): 'GPT2_ML的embedding是token、position两者embedding之和\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, name='Embedding-Position') x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Embedding-Norm') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
5,062,113,579,922,303,000
GPT2_ML的embedding是token、position两者embedding之和
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): '\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=PositionEmbedding, input_dim=self.max_position, output_dim=self.embedding_size, merge_mode='add', hierarchical=self.hierarchical_position, embeddings_initializer=self.initializer, name='Embedding-Position') x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Embedding-Norm') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Embedding-Mapping') return x
def apply_main_layers(self, inputs, index): 'GPT2_ML的主体是基于Self-Attention的模块\n 顺序:Att --> LN --> FFN --> Add --> LN\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) (xi, x, arguments) = (x, [x, x, x, attention_mask], {'a_bias': True}) x = self.apply(inputs=x, layer=MultiHeadAttention, arguments=arguments, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm-0' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm-1' % feed_forward_name)) return x
-8,692,270,126,352,804,000
GPT2_ML的主体是基于Self-Attention的模块 顺序:Att --> LN --> FFN --> Add --> LN
bert4keras/models.py
apply_main_layers
CurisZhou/bert4keras
python
def apply_main_layers(self, inputs, index): 'GPT2_ML的主体是基于Self-Attention的模块\n 顺序:Att --> LN --> FFN --> Add --> LN\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) (xi, x, arguments) = (x, [x, x, x, attention_mask], {'a_bias': True}) x = self.apply(inputs=x, layer=MultiHeadAttention, arguments=arguments, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm-0' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, epsilon=1e-05, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm-1' % feed_forward_name)) return x
def load_variable(self, checkpoint, name): '加载单个变量的函数\n ' variable = super(GPT2_ML, self).load_variable(checkpoint, name) if (name == 'newslm/embeddings/word_embed'): return self.load_embeddings(variable) else: return variable
-8,079,379,403,334,526,000
加载单个变量的函数
bert4keras/models.py
load_variable
CurisZhou/bert4keras
python
def load_variable(self, checkpoint, name): '\n ' variable = super(GPT2_ML, self).load_variable(checkpoint, name) if (name == 'newslm/embeddings/word_embed'): return self.load_embeddings(variable) else: return variable
def variable_mapping(self): '映射到官方GPT2_ML权重格式\n ' mapping = {'Embedding-Token': ['newslm/embeddings/word_embed'], 'Embedding-Position': ['newslm/embeddings/pos_embed'], 'Embedding-Norm': ['newslm/embeddings/LayerNorm_embed_norm/beta', 'newslm/embeddings/LayerNorm_embed_norm/gamma']} for i in range(self.num_hidden_layers): prefix = ('newslm/layer%02d/' % i) mapping.update({('Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'query_layer/kernel'), (prefix + 'query_layer/bias'), (prefix + 'key_layer/kernel'), (prefix + 'key_layer/bias'), (prefix + 'value_layer/kernel'), (prefix + 'value_layer/bias'), (prefix + 'context_projection_layer/kernel'), (prefix + 'context_projection_layer/bias')], ('Transformer-%d-FeedForward-Norm-0' % i): [(prefix + 'LayerNorm_mlp_ln0/beta'), (prefix + 'LayerNorm_mlp_ln0/gamma')], ('Transformer-%d-FeedForward' % i): [(prefix + 'intermediate/kernel'), (prefix + 'intermediate/bias'), (prefix + 'output/kernel'), (prefix + 'output/bias')], ('Transformer-%d-FeedForward-Norm-1' % i): [(prefix + 'LayerNorm_mlp_ln1/beta'), (prefix + 'LayerNorm_mlp_ln1/gamma')]}) return mapping
-7,901,784,136,043,684,000
映射到官方GPT2_ML权重格式
bert4keras/models.py
variable_mapping
CurisZhou/bert4keras
python
def variable_mapping(self): '\n ' mapping = {'Embedding-Token': ['newslm/embeddings/word_embed'], 'Embedding-Position': ['newslm/embeddings/pos_embed'], 'Embedding-Norm': ['newslm/embeddings/LayerNorm_embed_norm/beta', 'newslm/embeddings/LayerNorm_embed_norm/gamma']} for i in range(self.num_hidden_layers): prefix = ('newslm/layer%02d/' % i) mapping.update({('Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'query_layer/kernel'), (prefix + 'query_layer/bias'), (prefix + 'key_layer/kernel'), (prefix + 'key_layer/bias'), (prefix + 'value_layer/kernel'), (prefix + 'value_layer/bias'), (prefix + 'context_projection_layer/kernel'), (prefix + 'context_projection_layer/bias')], ('Transformer-%d-FeedForward-Norm-0' % i): [(prefix + 'LayerNorm_mlp_ln0/beta'), (prefix + 'LayerNorm_mlp_ln0/gamma')], ('Transformer-%d-FeedForward' % i): [(prefix + 'intermediate/kernel'), (prefix + 'intermediate/bias'), (prefix + 'output/kernel'), (prefix + 'output/bias')], ('Transformer-%d-FeedForward-Norm-1' % i): [(prefix + 'LayerNorm_mlp_ln1/beta'), (prefix + 'LayerNorm_mlp_ln1/gamma')]}) return mapping
def load_variable(self, checkpoint, name): '加载单个变量的函数\n ' variable = super(T5_Base, self).load_variable(checkpoint, name) if (name == 'shared/embedding'): return self.load_embeddings(variable) elif (name == 'decoder/logits/kernel'): return self.load_embeddings(variable.T).T elif ('relative_attention_bias' in name): return variable.T else: return variable
-7,277,155,176,814,381,000
加载单个变量的函数
bert4keras/models.py
load_variable
CurisZhou/bert4keras
python
def load_variable(self, checkpoint, name): '\n ' variable = super(T5_Base, self).load_variable(checkpoint, name) if (name == 'shared/embedding'): return self.load_embeddings(variable) elif (name == 'decoder/logits/kernel'): return self.load_embeddings(variable.T).T elif ('relative_attention_bias' in name): return variable.T else: return variable
def create_variable(self, name, value, dtype=None): '在tensorflow中创建一个变量\n ' if ('relative_attention_bias' in name): value = value.T return super(T5_Base, self).create_variable(name, value, dtype)
-5,795,463,588,135,894,000
在tensorflow中创建一个变量
bert4keras/models.py
create_variable
CurisZhou/bert4keras
python
def create_variable(self, name, value, dtype=None): '\n ' if ('relative_attention_bias' in name): value = value.T return super(T5_Base, self).create_variable(name, value, dtype)
def variable_mapping(self): '映射到官方T5权重格式\n ' mapping = {'Embedding-Token': ['shared/embedding'], 'Encoder-Embedding-Relative-Position': ['encoder/block_000/layer_000/SelfAttention/relative_attention_bias'], 'Encoder-Output-Norm': ['encoder/final_layer_norm/scale'], 'Decoder-Embedding-Relative-Position': ['decoder/block_000/layer_000/SelfAttention/relative_attention_bias'], 'Decoder-Output-Norm': ['decoder/final_layer_norm/scale']} for i in range(self.num_hidden_layers): prefix = ('encoder/block_%03d/' % i) mapping.update({('Encoder-Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'layer_000/SelfAttention/q'), (prefix + 'layer_000/SelfAttention/k'), (prefix + 'layer_000/SelfAttention/v'), (prefix + 'layer_000/SelfAttention/o')], ('Encoder-Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'layer_000/layer_norm/scale')], ('Encoder-Transformer-%d-FeedForward' % i): [(prefix + 'layer_001/DenseReluDense/wi/kernel'), (prefix + 'layer_001/DenseReluDense/wo/kernel')], ('Encoder-Transformer-%d-FeedForward-Norm' % i): [(prefix + 'layer_001/layer_norm/scale')]}) prefix = ('decoder/block_%03d/' % i) mapping.update({('Decoder-Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'layer_000/SelfAttention/q'), (prefix + 'layer_000/SelfAttention/k'), (prefix + 'layer_000/SelfAttention/v'), (prefix + 'layer_000/SelfAttention/o')], ('Decoder-Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'layer_000/layer_norm/scale')], ('Decoder-Transformer-%d-MultiHeadCrossAttention' % i): [(prefix + 'layer_001/EncDecAttention/q'), (prefix + 'layer_001/EncDecAttention/k'), (prefix + 'layer_001/EncDecAttention/v'), (prefix + 'layer_001/EncDecAttention/o')], ('Decoder-Transformer-%d-MultiHeadCrossAttention-Norm' % i): [(prefix + 'layer_001/layer_norm/scale')], ('Decoder-Transformer-%d-FeedForward' % i): [(prefix + 'layer_002/DenseReluDense/wi/kernel'), (prefix + 'layer_002/DenseReluDense/wo/kernel')], ('Decoder-Transformer-%d-FeedForward-Norm' % i): [(prefix + 'layer_002/layer_norm/scale')]}) if (self.version == 't5.1.1'): mapping['Encoder-Output-Norm'] = ['encoder/rms_norm/scale'] mapping['Decoder-Output-Norm'] = ['decoder/rms_norm/scale'] mapping['Decoder-Output-LM'] = ['decoder/logits/kernel'] mapping = {k: [i.replace('layer_norm', 'rms_norm') for i in v] for (k, v) in mapping.items()} for i in range(self.num_hidden_layers): for layer in [('Encoder-Transformer-%d-FeedForward' % i), ('Decoder-Transformer-%d-FeedForward' % i)]: mapping[layer] = [((mapping[layer][0][:(- 7)] + '_0') + mapping[layer][0][(- 7):]), ((mapping[layer][0][:(- 7)] + '_1') + mapping[layer][0][(- 7):]), mapping[layer][1]] return mapping
9,015,430,218,218,821,000
映射到官方T5权重格式
bert4keras/models.py
variable_mapping
CurisZhou/bert4keras
python
def variable_mapping(self): '\n ' mapping = {'Embedding-Token': ['shared/embedding'], 'Encoder-Embedding-Relative-Position': ['encoder/block_000/layer_000/SelfAttention/relative_attention_bias'], 'Encoder-Output-Norm': ['encoder/final_layer_norm/scale'], 'Decoder-Embedding-Relative-Position': ['decoder/block_000/layer_000/SelfAttention/relative_attention_bias'], 'Decoder-Output-Norm': ['decoder/final_layer_norm/scale']} for i in range(self.num_hidden_layers): prefix = ('encoder/block_%03d/' % i) mapping.update({('Encoder-Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'layer_000/SelfAttention/q'), (prefix + 'layer_000/SelfAttention/k'), (prefix + 'layer_000/SelfAttention/v'), (prefix + 'layer_000/SelfAttention/o')], ('Encoder-Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'layer_000/layer_norm/scale')], ('Encoder-Transformer-%d-FeedForward' % i): [(prefix + 'layer_001/DenseReluDense/wi/kernel'), (prefix + 'layer_001/DenseReluDense/wo/kernel')], ('Encoder-Transformer-%d-FeedForward-Norm' % i): [(prefix + 'layer_001/layer_norm/scale')]}) prefix = ('decoder/block_%03d/' % i) mapping.update({('Decoder-Transformer-%d-MultiHeadSelfAttention' % i): [(prefix + 'layer_000/SelfAttention/q'), (prefix + 'layer_000/SelfAttention/k'), (prefix + 'layer_000/SelfAttention/v'), (prefix + 'layer_000/SelfAttention/o')], ('Decoder-Transformer-%d-MultiHeadSelfAttention-Norm' % i): [(prefix + 'layer_000/layer_norm/scale')], ('Decoder-Transformer-%d-MultiHeadCrossAttention' % i): [(prefix + 'layer_001/EncDecAttention/q'), (prefix + 'layer_001/EncDecAttention/k'), (prefix + 'layer_001/EncDecAttention/v'), (prefix + 'layer_001/EncDecAttention/o')], ('Decoder-Transformer-%d-MultiHeadCrossAttention-Norm' % i): [(prefix + 'layer_001/layer_norm/scale')], ('Decoder-Transformer-%d-FeedForward' % i): [(prefix + 'layer_002/DenseReluDense/wi/kernel'), (prefix + 'layer_002/DenseReluDense/wo/kernel')], ('Decoder-Transformer-%d-FeedForward-Norm' % i): [(prefix + 'layer_002/layer_norm/scale')]}) if (self.version == 't5.1.1'): mapping['Encoder-Output-Norm'] = ['encoder/rms_norm/scale'] mapping['Decoder-Output-Norm'] = ['decoder/rms_norm/scale'] mapping['Decoder-Output-LM'] = ['decoder/logits/kernel'] mapping = {k: [i.replace('layer_norm', 'rms_norm') for i in v] for (k, v) in mapping.items()} for i in range(self.num_hidden_layers): for layer in [('Encoder-Transformer-%d-FeedForward' % i), ('Decoder-Transformer-%d-FeedForward' % i)]: mapping[layer] = [((mapping[layer][0][:(- 7)] + '_0') + mapping[layer][0][(- 7):]), ((mapping[layer][0][:(- 7)] + '_1') + mapping[layer][0][(- 7):]), mapping[layer][1]] return mapping
def get_inputs(self): 'T5的Encoder的输入只有token_ids\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Encoder-Input-Token') return x_in
5,315,704,348,216,274,000
T5的Encoder的输入只有token_ids
bert4keras/models.py
get_inputs
CurisZhou/bert4keras
python
def get_inputs(self): '\n ' x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Encoder-Input-Token') return x_in
def apply_embeddings(self, inputs): 'T5的embedding只有token embedding,\n 并把relative position embedding准备好,待attention使用。\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Encoder-Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Encoder-Embedding-Mapping') return x
4,566,806,562,077,514,000
T5的embedding只有token embedding, 并把relative position embedding准备好,待attention使用。
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): 'T5的embedding只有token embedding,\n 并把relative position embedding准备好,待attention使用。\n ' x = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Encoder-Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Encoder-Embedding-Mapping') return x
def apply_main_layers(self, inputs, index): 'T5的Encoder的主体是基于Self-Attention的模块\n 顺序:LN --> Att --> Add --> LN --> FFN --> Add\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Encoder-Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Encoder-Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias(x) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) x = self.apply(inputs=[x, x, x, position_bias], layer=MultiHeadAttention, arguments={'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, use_bias=False, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return x
8,024,917,962,971,062,000
T5的Encoder的主体是基于Self-Attention的模块 顺序:LN --> Att --> Add --> LN --> FFN --> Add
bert4keras/models.py
apply_main_layers
CurisZhou/bert4keras
python
def apply_main_layers(self, inputs, index): 'T5的Encoder的主体是基于Self-Attention的模块\n 顺序:LN --> Att --> Add --> LN --> FFN --> Add\n ' x = inputs z = self.layer_norm_conds[0] attention_name = ('Encoder-Transformer-%d-MultiHeadSelfAttention' % index) feed_forward_name = ('Encoder-Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias(x) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % attention_name)) x = self.apply(inputs=[x, x, x, position_bias], layer=MultiHeadAttention, arguments={'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, use_bias=False, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return x
def apply_final_layers(self, inputs): '剩余部分\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Encoder-Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Encoder-Output-Dropout') return x
-4,600,475,009,639,814,700
剩余部分
bert4keras/models.py
apply_final_layers
CurisZhou/bert4keras
python
def apply_final_layers(self, inputs): '\n ' x = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Encoder-Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Encoder-Output-Dropout') return x
def compute_position_bias(self, inputs=None): 'T5相对位置编码\n ' if (self.position_bias is None): x = inputs p = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=True, embeddings_initializer=self.initializer, name='Encoder-Embedding-Relative-Position') self.position_bias = p return self.position_bias
5,947,476,870,044,128,000
T5相对位置编码
bert4keras/models.py
compute_position_bias
CurisZhou/bert4keras
python
def compute_position_bias(self, inputs=None): '\n ' if (self.position_bias is None): x = inputs p = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=True, embeddings_initializer=self.initializer, name='Encoder-Embedding-Relative-Position') self.position_bias = p return self.position_bias
def get_inputs(self): 'T5的Decoder的输入为context序列和token_ids\n ' c_in = self.apply(layer=Input, shape=(self.sequence_length, self.hidden_size), name='Input-Context') x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Decoder-Input-Token') return [c_in, x_in]
989,582,094,490,067,700
T5的Decoder的输入为context序列和token_ids
bert4keras/models.py
get_inputs
CurisZhou/bert4keras
python
def get_inputs(self): '\n ' c_in = self.apply(layer=Input, shape=(self.sequence_length, self.hidden_size), name='Input-Context') x_in = self.apply(layer=Input, shape=(self.sequence_length,), name='Decoder-Input-Token') return [c_in, x_in]
def apply_embeddings(self, inputs): 'T5的embedding只有token embedding,\n 并把relative position embedding准备好,待attention使用。\n ' (c, x) = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Decoder-Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Decoder-Embedding-Mapping') return [c, x]
1,142,845,852,842,041,500
T5的embedding只有token embedding, 并把relative position embedding准备好,待attention使用。
bert4keras/models.py
apply_embeddings
CurisZhou/bert4keras
python
def apply_embeddings(self, inputs): 'T5的embedding只有token embedding,\n 并把relative position embedding准备好,待attention使用。\n ' (c, x) = inputs x = self.apply(inputs=x, layer=Embedding, input_dim=self.vocab_size, output_dim=self.embedding_size, embeddings_initializer=self.initializer, mask_zero=True, name='Embedding-Token') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Decoder-Embedding-Dropout') if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.hidden_size, kernel_initializer=self.initializer, name='Decoder-Embedding-Mapping') return [c, x]
def apply_main_layers(self, inputs, index): 'T5的Dencoder主体是基于Self-Attention、Cross-Attention的模块\n 顺序:LN --> Att1 --> Add --> LN --> Att2 --> Add --> LN --> FFN --> Add\n ' (c, x) = inputs z = self.layer_norm_conds[0] self_attention_name = ('Decoder-Transformer-%d-MultiHeadSelfAttention' % index) cross_attention_name = ('Decoder-Transformer-%d-MultiHeadCrossAttention' % index) feed_forward_name = ('Decoder-Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias([x, c]) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % self_attention_name)) x = self.apply(inputs=[x, x, x, attention_mask, position_bias[0]], layer=MultiHeadAttention, arguments={'a_bias': True, 'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=self_attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % self_attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % self_attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % cross_attention_name)) x = self.apply(inputs=[x, c, c, position_bias[1]], layer=MultiHeadAttention, arguments={'a_bias': None, 'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=cross_attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % cross_attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % cross_attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, use_bias=False, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return [c, x]
-6,283,920,252,393,746,000
T5的Dencoder主体是基于Self-Attention、Cross-Attention的模块 顺序:LN --> Att1 --> Add --> LN --> Att2 --> Add --> LN --> FFN --> Add
bert4keras/models.py
apply_main_layers
CurisZhou/bert4keras
python
def apply_main_layers(self, inputs, index): 'T5的Dencoder主体是基于Self-Attention、Cross-Attention的模块\n 顺序:LN --> Att1 --> Add --> LN --> Att2 --> Add --> LN --> FFN --> Add\n ' (c, x) = inputs z = self.layer_norm_conds[0] self_attention_name = ('Decoder-Transformer-%d-MultiHeadSelfAttention' % index) cross_attention_name = ('Decoder-Transformer-%d-MultiHeadCrossAttention' % index) feed_forward_name = ('Decoder-Transformer-%d-FeedForward' % index) attention_mask = self.compute_attention_bias(index) position_bias = self.compute_position_bias([x, c]) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % self_attention_name)) x = self.apply(inputs=[x, x, x, attention_mask, position_bias[0]], layer=MultiHeadAttention, arguments={'a_bias': True, 'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=self_attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % self_attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % self_attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % cross_attention_name)) x = self.apply(inputs=[x, c, c, position_bias[1]], layer=MultiHeadAttention, arguments={'a_bias': None, 'p_bias': 't5_relative'}, heads=self.num_attention_heads, head_size=self.attention_head_size, out_dim=self.hidden_size, key_size=self.attention_key_size, use_bias=False, attention_scale=False, kernel_initializer=self.initializer, name=cross_attention_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % cross_attention_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % cross_attention_name)) xi = x x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name=('%s-Norm' % feed_forward_name)) x = self.apply(inputs=x, layer=FeedForward, units=self.intermediate_size, activation=self.hidden_act, use_bias=False, kernel_initializer=self.initializer, name=feed_forward_name) x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name=('%s-Dropout' % feed_forward_name)) x = self.apply(inputs=[xi, x], layer=Add, name=('%s-Add' % feed_forward_name)) return [c, x]
def apply_final_layers(self, inputs): '剩余部分\n ' (c, x) = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Decoder-Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Decoder-Output-Dropout') x = self.apply(inputs=x, layer=Lambda, function=(lambda x: (x / np.sqrt(self.hidden_size))), mask=(lambda i, m: m), name='Decoder-Output-Scale') if self.with_lm: if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.embedding_size, kernel_initializer=self.initializer, name='Decoder-Output-Mapping') lm_activation = ('softmax' if (self.with_lm is True) else self.with_lm) if (self.version == 't5.1.0'): x = self.apply(inputs=x, layer=Embedding, arguments={'mode': 'dense'}, name='Embedding-Token') x = self.apply(inputs=x, layer=Activation, activation=lm_activation, name='Dencoder-Output-LM-Activation') else: x = self.apply(inputs=x, layer=Dense, units=self.vocab_size, activation=lm_activation, use_bias=False, kernel_initializer=self.initializer, name='Decoder-Output-LM') return x
-6,840,580,732,206,628,000
剩余部分
bert4keras/models.py
apply_final_layers
CurisZhou/bert4keras
python
def apply_final_layers(self, inputs): '\n ' (c, x) = inputs z = self.layer_norm_conds[0] x = self.apply(inputs=self.simplify([x, z]), layer=LayerNormalization, center=False, epsilon=1e-06, conditional=(z is not None), hidden_units=self.layer_norm_conds[1], hidden_activation=self.layer_norm_conds[2], hidden_initializer=self.initializer, name='Decoder-Output-Norm') x = self.apply(inputs=x, layer=Dropout, rate=self.dropout_rate, name='Decoder-Output-Dropout') x = self.apply(inputs=x, layer=Lambda, function=(lambda x: (x / np.sqrt(self.hidden_size))), mask=(lambda i, m: m), name='Decoder-Output-Scale') if self.with_lm: if (self.embedding_size != self.hidden_size): x = self.apply(inputs=x, layer=Dense, units=self.embedding_size, kernel_initializer=self.initializer, name='Decoder-Output-Mapping') lm_activation = ('softmax' if (self.with_lm is True) else self.with_lm) if (self.version == 't5.1.0'): x = self.apply(inputs=x, layer=Embedding, arguments={'mode': 'dense'}, name='Embedding-Token') x = self.apply(inputs=x, layer=Activation, activation=lm_activation, name='Dencoder-Output-LM-Activation') else: x = self.apply(inputs=x, layer=Dense, units=self.vocab_size, activation=lm_activation, use_bias=False, kernel_initializer=self.initializer, name='Decoder-Output-LM') return x
def compute_attention_bias(self, inputs=None): '修改LM Mask的序列长度(从 self.inputs[0] 改为 self.inputs[1] )\n ' old_inputs = self.inputs[:] self.inputs = [old_inputs[1]] mask = super(T5_Decoder, self).compute_attention_bias(inputs) self.inputs = old_inputs return mask
-3,453,275,790,045,292,500
修改LM Mask的序列长度(从 self.inputs[0] 改为 self.inputs[1] )
bert4keras/models.py
compute_attention_bias
CurisZhou/bert4keras
python
def compute_attention_bias(self, inputs=None): '\n ' old_inputs = self.inputs[:] self.inputs = [old_inputs[1]] mask = super(T5_Decoder, self).compute_attention_bias(inputs) self.inputs = old_inputs return mask
def compute_position_bias(self, inputs=None): 'T5相对位置编码\n ' if (self.position_bias is None): (x, c) = inputs p1 = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=False, embeddings_initializer=self.initializer, name='Decoder-Embedding-Relative-Position') p2 = self.apply(inputs=[x, c], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=False, embeddings_initializer=self.initializer, name='Decoder-Embedding-Relative-Position') self.position_bias = (p1, p2) return self.position_bias
5,780,925,133,353,333,000
T5相对位置编码
bert4keras/models.py
compute_position_bias
CurisZhou/bert4keras
python
def compute_position_bias(self, inputs=None): '\n ' if (self.position_bias is None): (x, c) = inputs p1 = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=False, embeddings_initializer=self.initializer, name='Decoder-Embedding-Relative-Position') p2 = self.apply(inputs=[x, c], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=False, embeddings_initializer=self.initializer, name='Decoder-Embedding-Relative-Position') self.position_bias = (p1, p2) return self.position_bias
def build(self, **kwargs): '同时构建Encoder和Decoder\n ' self._encoder.build(**kwargs) self._decoder.build(**kwargs) self.encoder = self._encoder.model self.decoder = self._decoder.model self.inputs = (self.encoder.inputs + self.decoder.inputs[1:]) self.outputs = self.decoder((self.encoder.outputs + self.decoder.inputs[1:])) self.model = Model(self.inputs, self.outputs)
-7,587,914,611,457,659,000
同时构建Encoder和Decoder
bert4keras/models.py
build
CurisZhou/bert4keras
python
def build(self, **kwargs): '\n ' self._encoder.build(**kwargs) self._decoder.build(**kwargs) self.encoder = self._encoder.model self.decoder = self._decoder.model self.inputs = (self.encoder.inputs + self.decoder.inputs[1:]) self.outputs = self.decoder((self.encoder.outputs + self.decoder.inputs[1:])) self.model = Model(self.inputs, self.outputs)
@lru_cache(1) def get_query_registry(): 'This may be overridden via dependency_overrides.' return default_query_registry
2,473,457,330,083,213,300
This may be overridden via dependency_overrides.
tiled/server/core.py
get_query_registry
martindurant/tiled
python
@lru_cache(1) def get_query_registry(): return default_query_registry
@lru_cache(1) def get_serialization_registry(): 'This may be overridden via dependency_overrides.' return default_serialization_registry
8,272,171,641,012,041,000
This may be overridden via dependency_overrides.
tiled/server/core.py
get_serialization_registry
martindurant/tiled
python
@lru_cache(1) def get_serialization_registry(): return default_serialization_registry
def reader(entry: Any=Depends(entry)): 'Specify a path parameter and use it to look up a reader.' if (not isinstance(entry, DuckReader)): raise HTTPException(status_code=404, detail='This is not a Reader.') return entry
-682,963,902,140,618,500
Specify a path parameter and use it to look up a reader.
tiled/server/core.py
reader
martindurant/tiled
python
def reader(entry: Any=Depends(entry)): if (not isinstance(entry, DuckReader)): raise HTTPException(status_code=404, detail='This is not a Reader.') return entry
def block(block: str=Query(..., regex='^[0-9]*(,[0-9]+)*$')): 'Specify and parse a block index parameter.' if (not block): return () return tuple(map(int, block.split(',')))
-3,962,916,374,847,261,700
Specify and parse a block index parameter.
tiled/server/core.py
block
martindurant/tiled
python
def block(block: str=Query(..., regex='^[0-9]*(,[0-9]+)*$')): if (not block): return () return tuple(map(int, block.split(',')))
def expected_shape(expected_shape: Optional[str]=Query(None, min_length=1, regex='^[0-9]+(,[0-9]+)*$|^scalar$')): 'Specify and parse an expected_shape parameter.' if (expected_shape is None): return if (expected_shape == 'scalar'): return () return tuple(map(int, expected_shape.split(',')))
4,958,446,584,286,708,000
Specify and parse an expected_shape parameter.
tiled/server/core.py
expected_shape
martindurant/tiled
python
def expected_shape(expected_shape: Optional[str]=Query(None, min_length=1, regex='^[0-9]+(,[0-9]+)*$|^scalar$')): if (expected_shape is None): return if (expected_shape == 'scalar'): return () return tuple(map(int, expected_shape.split(',')))
def slice_(slice: str=Query(None, regex='^[0-9,:]*$')): 'Specify and parse a block index parameter.' import numpy return tuple([eval(f'numpy.s_[{dim!s}]', {'numpy': numpy}) for dim in (slice or '').split(',') if dim])
-4,360,326,586,739,573,000
Specify and parse a block index parameter.
tiled/server/core.py
slice_
martindurant/tiled
python
def slice_(slice: str=Query(None, regex='^[0-9,:]*$')): import numpy return tuple([eval(f'numpy.s_[{dim!s}]', {'numpy': numpy}) for dim in (slice or ).split(',') if dim])
def len_or_approx(tree): "\n Prefer approximate length if implemented. (It's cheaper.)\n " try: return operator.length_hint(tree) except TypeError: return len(tree)
4,128,237,492,595,907,000
Prefer approximate length if implemented. (It's cheaper.)
tiled/server/core.py
len_or_approx
martindurant/tiled
python
def len_or_approx(tree): "\n \n " try: return operator.length_hint(tree) except TypeError: return len(tree)
def _patch_naive_datetimes(obj): '\n If a naive datetime is found, attach local time.\n\n Msgpack can only serialize datetimes with tzinfo.\n ' if hasattr(obj, 'items'): patched_obj = {} for (k, v) in obj.items(): patched_obj[k] = _patch_naive_datetimes(v) elif ((not isinstance(obj, str)) and isinstance(obj, collections.abc.Iterable)): patched_obj = [] for item in obj: patched_obj.append(_patch_naive_datetimes(item)) elif (isinstance(obj, datetime) and (obj.tzinfo is None)): patched_obj = obj.astimezone(_LOCAL_TZINFO) else: patched_obj = obj return patched_obj
3,416,903,018,629,953,500
If a naive datetime is found, attach local time. Msgpack can only serialize datetimes with tzinfo.
tiled/server/core.py
_patch_naive_datetimes
martindurant/tiled
python
def _patch_naive_datetimes(obj): '\n If a naive datetime is found, attach local time.\n\n Msgpack can only serialize datetimes with tzinfo.\n ' if hasattr(obj, 'items'): patched_obj = {} for (k, v) in obj.items(): patched_obj[k] = _patch_naive_datetimes(v) elif ((not isinstance(obj, str)) and isinstance(obj, collections.abc.Iterable)): patched_obj = [] for item in obj: patched_obj.append(_patch_naive_datetimes(item)) elif (isinstance(obj, datetime) and (obj.tzinfo is None)): patched_obj = obj.astimezone(_LOCAL_TZINFO) else: patched_obj = obj return patched_obj
@contextlib.contextmanager def record_timing(metrics, key): '\n Set timings[key] equal to the run time (in milliseconds) of the context body.\n ' t0 = time.perf_counter() (yield) metrics[key]['dur'] += (time.perf_counter() - t0)
-286,822,576,995,709,800
Set timings[key] equal to the run time (in milliseconds) of the context body.
tiled/server/core.py
record_timing
martindurant/tiled
python
@contextlib.contextmanager def record_timing(metrics, key): '\n \n ' t0 = time.perf_counter() (yield) metrics[key]['dur'] += (time.perf_counter() - t0)
def device_asset_filtered_get(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_filtered_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_filtered_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_filtered_get_with_http_info(scope_id, device_id, **kwargs) return data
-7,691,028,147,354,361,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_filtered_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The filter of the request :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_filtered_get
liang-faan/SmartIOT-Diec
python
def device_asset_filtered_get(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_filtered_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_filtered_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_filtered_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_asset_filtered_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_filtered_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_filtered_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_filtered_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_filtered_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-1,287,436,892,656,772,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_filtered_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The filter of the request :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_filtered_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_asset_filtered_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_filtered_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_filtered_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_filtered_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_filtered_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_asset_get(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_get_with_http_info(scope_id, device_id, **kwargs) return data
-4,306,101,272,203,191,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_get
liang-faan/SmartIOT-Diec
python
def device_asset_get(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_asset_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
4,708,024,282,041,352,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_asset_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_asset_read(self, scope_id, device_id, **kwargs): 'Reads asset channel values # noqa: E501\n\n Returns the value read from the asset channel # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_read(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the read request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_read_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_read_with_http_info(scope_id, device_id, **kwargs) return data
-8,562,612,436,689,144,000
Reads asset channel values # noqa: E501 Returns the value read from the asset channel # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_read(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The filter of the read request :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_read
liang-faan/SmartIOT-Diec
python
def device_asset_read(self, scope_id, device_id, **kwargs): 'Reads asset channel values # noqa: E501\n\n Returns the value read from the asset channel # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_read(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the read request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_read_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_read_with_http_info(scope_id, device_id, **kwargs) return data
def device_asset_read_with_http_info(self, scope_id, device_id, **kwargs): 'Reads asset channel values # noqa: E501\n\n Returns the value read from the asset channel # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_read_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the read request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_read" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_read`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_read`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets/_read', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-6,432,661,771,808,377,000
Reads asset channel values # noqa: E501 Returns the value read from the asset channel # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_read_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The filter of the read request :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_read_with_http_info
liang-faan/SmartIOT-Diec
python
def device_asset_read_with_http_info(self, scope_id, device_id, **kwargs): 'Reads asset channel values # noqa: E501\n\n Returns the value read from the asset channel # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_read_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The filter of the read request\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_read" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_read`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_read`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets/_read', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_asset_write(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_write(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The values to write to the asset channels\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_write_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_write_with_http_info(scope_id, device_id, **kwargs) return data
-8,136,015,350,311,523,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_write(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The values to write to the asset channels :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_write
liang-faan/SmartIOT-Diec
python
def device_asset_write(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_write(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The values to write to the asset channels\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_asset_write_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_asset_write_with_http_info(scope_id, device_id, **kwargs) return data
def device_asset_write_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_write_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The values to write to the asset channels\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_write" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_write`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_write`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets/_write', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
7,514,962,425,392,813,000
Gets a list of assets # noqa: E501 Returns the list of all the Assets installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_asset_write_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :param DeviceAssets body: The values to write to the asset channels :return: DeviceAssets If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_asset_write_with_http_info
liang-faan/SmartIOT-Diec
python
def device_asset_write_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of assets # noqa: E501\n\n Returns the list of all the Assets installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_asset_write_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :param DeviceAssets body: The values to write to the asset channels\n :return: DeviceAssets\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_asset_write" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_asset_write`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_asset_write`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/assets/_write', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceAssets', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_bundle_get(self, scope_id, device_id, **kwargs): 'Gets a list of bundles # noqa: E501\n\n Returns the list of all the Bundles installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceBundles\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_bundle_get_with_http_info(scope_id, device_id, **kwargs) return data
-5,045,718,076,770,206,000
Gets a list of bundles # noqa: E501 Returns the list of all the Bundles installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceBundles If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_get
liang-faan/SmartIOT-Diec
python
def device_bundle_get(self, scope_id, device_id, **kwargs): 'Gets a list of bundles # noqa: E501\n\n Returns the list of all the Bundles installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceBundles\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_bundle_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_bundle_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of bundles # noqa: E501\n\n Returns the list of all the Bundles installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceBundles\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceBundles', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
367,786,487,785,366,500
Gets a list of bundles # noqa: E501 Returns the list of all the Bundles installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceBundles If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_bundle_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of bundles # noqa: E501\n\n Returns the list of all the Bundles installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceBundles\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceBundles', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_bundle_start(self, scope_id, device_id, bundle_id, **kwargs): 'Start a bundle # noqa: E501\n\n Starts the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_start(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to start (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, **kwargs) else: data = self.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, **kwargs) return data
-1,387,174,549,457,238,800
Start a bundle # noqa: E501 Starts the specified bundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_start(scope_id, device_id, bundle_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param str bundle_id: the ID of the bundle to start (required) :param int timeout: The timeout of the operation in milliseconds :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_start
liang-faan/SmartIOT-Diec
python
def device_bundle_start(self, scope_id, device_id, bundle_id, **kwargs): 'Start a bundle # noqa: E501\n\n Starts the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_start(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to start (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, **kwargs) else: data = self.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, **kwargs) return data
def device_bundle_start_with_http_info(self, scope_id, device_id, bundle_id, **kwargs): 'Start a bundle # noqa: E501\n\n Starts the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to start (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'bundle_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_start" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_start`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_start`') if (('bundle_id' not in params) or (params['bundle_id'] is None)): raise ValueError('Missing the required parameter `bundle_id` when calling `device_bundle_start`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('bundle_id' in params): path_params['bundleId'] = params['bundle_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles/{bundleId}/_start', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
4,537,594,976,458,439,000
Start a bundle # noqa: E501 Starts the specified bundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param str bundle_id: the ID of the bundle to start (required) :param int timeout: The timeout of the operation in milliseconds :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_start_with_http_info
liang-faan/SmartIOT-Diec
python
def device_bundle_start_with_http_info(self, scope_id, device_id, bundle_id, **kwargs): 'Start a bundle # noqa: E501\n\n Starts the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_start_with_http_info(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to start (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'bundle_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_start" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_start`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_start`') if (('bundle_id' not in params) or (params['bundle_id'] is None)): raise ValueError('Missing the required parameter `bundle_id` when calling `device_bundle_start`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('bundle_id' in params): path_params['bundleId'] = params['bundle_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles/{bundleId}/_start', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_bundle_stop(self, scope_id, device_id, bundle_id, **kwargs): 'Stop a bundle # noqa: E501\n\n Stops the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_stop(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to stop (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, **kwargs) else: data = self.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, **kwargs) return data
1,561,018,001,925,357,600
Stop a bundle # noqa: E501 Stops the specified bundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_stop(scope_id, device_id, bundle_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param str bundle_id: the ID of the bundle to stop (required) :param int timeout: The timeout of the operation in milliseconds :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_stop
liang-faan/SmartIOT-Diec
python
def device_bundle_stop(self, scope_id, device_id, bundle_id, **kwargs): 'Stop a bundle # noqa: E501\n\n Stops the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_stop(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to stop (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, **kwargs) else: data = self.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, **kwargs) return data
def device_bundle_stop_with_http_info(self, scope_id, device_id, bundle_id, **kwargs): 'Stop a bundle # noqa: E501\n\n Stops the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to stop (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'bundle_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_stop" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_stop`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_stop`') if (('bundle_id' not in params) or (params['bundle_id'] is None)): raise ValueError('Missing the required parameter `bundle_id` when calling `device_bundle_stop`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('bundle_id' in params): path_params['bundleId'] = params['bundle_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles/{bundleId}/_stop', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-2,764,684,177,884,163,000
Stop a bundle # noqa: E501 Stops the specified bundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device. (required) :param str device_id: The id of the device (required) :param str bundle_id: the ID of the bundle to stop (required) :param int timeout: The timeout of the operation in milliseconds :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_bundle_stop_with_http_info
liang-faan/SmartIOT-Diec
python
def device_bundle_stop_with_http_info(self, scope_id, device_id, bundle_id, **kwargs): 'Stop a bundle # noqa: E501\n\n Stops the specified bundle # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_bundle_stop_with_http_info(scope_id, device_id, bundle_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device. (required)\n :param str device_id: The id of the device (required)\n :param str bundle_id: the ID of the bundle to stop (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'bundle_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_bundle_stop" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_bundle_stop`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_bundle_stop`') if (('bundle_id' not in params) or (params['bundle_id'] is None)): raise ValueError('Missing the required parameter `bundle_id` when calling `device_bundle_stop`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('bundle_id' in params): path_params['bundleId'] = params['bundle_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/bundles/{bundleId}/_stop', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_command_execute(self, scope_id, device_id, body, **kwargs): 'Executes a command # noqa: E501\n\n Executes a remote command on a device and return the command output. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_command_execute(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param DeviceCommandInput body: The input command (required)\n :param int timeout: The timeout of the command execution\n :return: DeviceCommandOutput\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_command_execute_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_command_execute_with_http_info(scope_id, device_id, body, **kwargs) return data
-2,246,204,052,249,301,500
Executes a command # noqa: E501 Executes a remote command on a device and return the command output. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_command_execute(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param DeviceCommandInput body: The input command (required) :param int timeout: The timeout of the command execution :return: DeviceCommandOutput If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_command_execute
liang-faan/SmartIOT-Diec
python
def device_command_execute(self, scope_id, device_id, body, **kwargs): 'Executes a command # noqa: E501\n\n Executes a remote command on a device and return the command output. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_command_execute(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param DeviceCommandInput body: The input command (required)\n :param int timeout: The timeout of the command execution\n :return: DeviceCommandOutput\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_command_execute_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_command_execute_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_command_execute_with_http_info(self, scope_id, device_id, body, **kwargs): 'Executes a command # noqa: E501\n\n Executes a remote command on a device and return the command output. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_command_execute_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param DeviceCommandInput body: The input command (required)\n :param int timeout: The timeout of the command execution\n :return: DeviceCommandOutput\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_command_execute" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_command_execute`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_command_execute`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_command_execute`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/commands/_execute', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceCommandOutput', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
669,305,344,334,408,700
Executes a command # noqa: E501 Executes a remote command on a device and return the command output. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_command_execute_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param DeviceCommandInput body: The input command (required) :param int timeout: The timeout of the command execution :return: DeviceCommandOutput If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_command_execute_with_http_info
liang-faan/SmartIOT-Diec
python
def device_command_execute_with_http_info(self, scope_id, device_id, body, **kwargs): 'Executes a command # noqa: E501\n\n Executes a remote command on a device and return the command output. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_command_execute_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param DeviceCommandInput body: The input command (required)\n :param int timeout: The timeout of the command execution\n :return: DeviceCommandOutput\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_command_execute" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_command_execute`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_command_execute`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_command_execute`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/commands/_execute', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceCommandOutput', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_configuration_component_get(self, scope_id, device_id, component_id, **kwargs): "Gets the configuration of a component on a device # noqa: E501\n\n Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_get(scope_id, device_id, component_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: An optional id of the component to get the configuration for (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, **kwargs) else: data = self.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, **kwargs) return data
-2,714,974,669,800,328,700
Gets the configuration of a component on a device # noqa: E501 Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_component_get(scope_id, device_id, component_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param str component_id: An optional id of the component to get the configuration for (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_component_get
liang-faan/SmartIOT-Diec
python
def device_configuration_component_get(self, scope_id, device_id, component_id, **kwargs): "Gets the configuration of a component on a device # noqa: E501\n\n Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_get(scope_id, device_id, component_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: An optional id of the component to get the configuration for (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, **kwargs) else: data = self.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, **kwargs) return data
def device_configuration_component_get_with_http_info(self, scope_id, device_id, component_id, **kwargs): "Gets the configuration of a component on a device # noqa: E501\n\n Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: An optional id of the component to get the configuration for (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n " all_params = ['scope_id', 'device_id', 'component_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_component_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_component_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_component_get`') if (('component_id' not in params) or (params['component_id'] is None)): raise ValueError('Missing the required parameter `component_id` when calling `device_configuration_component_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('component_id' in params): path_params['componentId'] = params['component_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations/{componentId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-6,996,181,902,600,737,000
Gets the configuration of a component on a device # noqa: E501 Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param str component_id: An optional id of the component to get the configuration for (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_component_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_configuration_component_get_with_http_info(self, scope_id, device_id, component_id, **kwargs): "Gets the configuration of a component on a device # noqa: E501\n\n Returns the configuration of a device or the configuration of the OSGi component identified with specified PID (service's persistent identity). In the OSGi framework, the service's persistent identity is defined as the name attribute of the Component Descriptor XML file; at runtime, the same value is also available in the component.name and in the service.pid attributes of the Component Configuration. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_get_with_http_info(scope_id, device_id, component_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: An optional id of the component to get the configuration for (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n " all_params = ['scope_id', 'device_id', 'component_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_component_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_component_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_component_get`') if (('component_id' not in params) or (params['component_id'] is None)): raise ValueError('Missing the required parameter `component_id` when calling `device_configuration_component_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('component_id' in params): path_params['componentId'] = params['component_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations/{componentId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_configuration_component_update(self, scope_id, device_id, component_id, body, **kwargs): 'Updates the configuration of a component on a device # noqa: E501\n\n Updates a device component configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_update(scope_id, device_id, component_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: The component id to update (required)\n :param DeviceComponentConfiguration body: The component configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, **kwargs) else: data = self.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, **kwargs) return data
-8,871,806,889,950,746,000
Updates the configuration of a component on a device # noqa: E501 Updates a device component configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_component_update(scope_id, device_id, component_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param str component_id: The component id to update (required) :param DeviceComponentConfiguration body: The component configuration to send to the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_component_update
liang-faan/SmartIOT-Diec
python
def device_configuration_component_update(self, scope_id, device_id, component_id, body, **kwargs): 'Updates the configuration of a component on a device # noqa: E501\n\n Updates a device component configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_update(scope_id, device_id, component_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: The component id to update (required)\n :param DeviceComponentConfiguration body: The component configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, **kwargs) else: data = self.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, **kwargs) return data
def device_configuration_component_update_with_http_info(self, scope_id, device_id, component_id, body, **kwargs): 'Updates the configuration of a component on a device # noqa: E501\n\n Updates a device component configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: The component id to update (required)\n :param DeviceComponentConfiguration body: The component configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'component_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_component_update" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_component_update`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_component_update`') if (('component_id' not in params) or (params['component_id'] is None)): raise ValueError('Missing the required parameter `component_id` when calling `device_configuration_component_update`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_configuration_component_update`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('component_id' in params): path_params['componentId'] = params['component_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations/{componentId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-6,409,292,919,335,381,000
Updates the configuration of a component on a device # noqa: E501 Updates a device component configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param str component_id: The component id to update (required) :param DeviceComponentConfiguration body: The component configuration to send to the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_component_update_with_http_info
liang-faan/SmartIOT-Diec
python
def device_configuration_component_update_with_http_info(self, scope_id, device_id, component_id, body, **kwargs): 'Updates the configuration of a component on a device # noqa: E501\n\n Updates a device component configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_component_update_with_http_info(scope_id, device_id, component_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param str component_id: The component id to update (required)\n :param DeviceComponentConfiguration body: The component configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'component_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_component_update" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_component_update`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_component_update`') if (('component_id' not in params) or (params['component_id'] is None)): raise ValueError('Missing the required parameter `component_id` when calling `device_configuration_component_update`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_configuration_component_update`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('component_id' in params): path_params['componentId'] = params['component_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations/{componentId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_configuration_get(self, scope_id, device_id, **kwargs): 'Gets the device configurations # noqa: E501\n\n Returns the current configuration of a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_configuration_get_with_http_info(scope_id, device_id, **kwargs) return data
-6,030,675,002,880,919,000
Gets the device configurations # noqa: E501 Returns the current configuration of a device # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_get
liang-faan/SmartIOT-Diec
python
def device_configuration_get(self, scope_id, device_id, **kwargs): 'Gets the device configurations # noqa: E501\n\n Returns the current configuration of a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_configuration_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_configuration_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets the device configurations # noqa: E501\n\n Returns the current configuration of a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
4,848,512,440,654,384,000
Gets the device configurations # noqa: E501 Returns the current configuration of a device # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_configuration_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets the device configurations # noqa: E501\n\n Returns the current configuration of a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_configuration_update(self, scope_id, device_id, body, **kwargs): 'Updates a device configuration # noqa: E501\n\n Updates a device configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_update(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param DeviceConfiguration body: The configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_update_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_configuration_update_with_http_info(scope_id, device_id, body, **kwargs) return data
8,837,183,891,515,892,000
Updates a device configuration # noqa: E501 Updates a device configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_update(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param DeviceConfiguration body: The configuration to send to the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_update
liang-faan/SmartIOT-Diec
python
def device_configuration_update(self, scope_id, device_id, body, **kwargs): 'Updates a device configuration # noqa: E501\n\n Updates a device configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_update(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param DeviceConfiguration body: The configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_configuration_update_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_configuration_update_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_configuration_update_with_http_info(self, scope_id, device_id, body, **kwargs): 'Updates a device configuration # noqa: E501\n\n Updates a device configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_update_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param DeviceConfiguration body: The configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_update" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_update`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_update`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_configuration_update`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-8,796,454,958,954,416,000
Updates a device configuration # noqa: E501 Updates a device configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_configuration_update_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device. (required) :param str device_id: The id of the device (required) :param DeviceConfiguration body: The configuration to send to the device (required) :param int timeout: The timeout of the operation in milliseconds :return: DeviceConfiguration If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_configuration_update_with_http_info
liang-faan/SmartIOT-Diec
python
def device_configuration_update_with_http_info(self, scope_id, device_id, body, **kwargs): 'Updates a device configuration # noqa: E501\n\n Updates a device configuration # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_configuration_update_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device. (required)\n :param str device_id: The id of the device (required)\n :param DeviceConfiguration body: The configuration to send to the device (required)\n :param int timeout: The timeout of the operation in milliseconds\n :return: DeviceConfiguration\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_configuration_update" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_configuration_update`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_configuration_update`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_configuration_update`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/configurations', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceConfiguration', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_count(self, scope_id, body, **kwargs): 'Counts the Devices # noqa: E501\n\n Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_count(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results (required)\n :param DeviceQuery body: The DeviceQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_count_with_http_info(scope_id, body, **kwargs) else: data = self.device_count_with_http_info(scope_id, body, **kwargs) return data
-3,912,583,330,866,075,600
Counts the Devices # noqa: E501 Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_count(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to count results (required) :param DeviceQuery body: The DeviceQuery to use to filter count results (required) :return: CountResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_count
liang-faan/SmartIOT-Diec
python
def device_count(self, scope_id, body, **kwargs): 'Counts the Devices # noqa: E501\n\n Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_count(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results (required)\n :param DeviceQuery body: The DeviceQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_count_with_http_info(scope_id, body, **kwargs) else: data = self.device_count_with_http_info(scope_id, body, **kwargs) return data
def device_count_with_http_info(self, scope_id, body, **kwargs): 'Counts the Devices # noqa: E501\n\n Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_count_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results (required)\n :param DeviceQuery body: The DeviceQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_count" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_count`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_count`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/_count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CountResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
5,701,450,040,134,195,000
Counts the Devices # noqa: E501 Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_count_with_http_info(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to count results (required) :param DeviceQuery body: The DeviceQuery to use to filter count results (required) :return: CountResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_count_with_http_info
liang-faan/SmartIOT-Diec
python
def device_count_with_http_info(self, scope_id, body, **kwargs): 'Counts the Devices # noqa: E501\n\n Counts the Devices with the given DeviceQuery parameter returning the number of matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_count_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results (required)\n :param DeviceQuery body: The DeviceQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_count" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_count`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_count`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/_count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CountResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_create(self, scope_id, body, **kwargs): 'Create an Device # noqa: E501\n\n Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_create(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to create the Device. (required)\n :param DeviceCreator body: Provides the information for the new Device to be created (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_create_with_http_info(scope_id, body, **kwargs) else: data = self.device_create_with_http_info(scope_id, body, **kwargs) return data
6,839,040,264,747,016,000
Create an Device # noqa: E501 Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_create(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to create the Device. (required) :param DeviceCreator body: Provides the information for the new Device to be created (required) :return: Device If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_create
liang-faan/SmartIOT-Diec
python
def device_create(self, scope_id, body, **kwargs): 'Create an Device # noqa: E501\n\n Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_create(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to create the Device. (required)\n :param DeviceCreator body: Provides the information for the new Device to be created (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_create_with_http_info(scope_id, body, **kwargs) else: data = self.device_create_with_http_info(scope_id, body, **kwargs) return data
def device_create_with_http_info(self, scope_id, body, **kwargs): 'Create an Device # noqa: E501\n\n Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_create_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to create the Device. (required)\n :param DeviceCreator body: Provides the information for the new Device to be created (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_create" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_create`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_create`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-2,755,348,109,576,455,700
Create an Device # noqa: E501 Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_create_with_http_info(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to create the Device. (required) :param DeviceCreator body: Provides the information for the new Device to be created (required) :return: Device If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_create_with_http_info
liang-faan/SmartIOT-Diec
python
def device_create_with_http_info(self, scope_id, body, **kwargs): 'Create an Device # noqa: E501\n\n Creates a new Device based on the information provided in DeviceCreator parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_create_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to create the Device. (required)\n :param DeviceCreator body: Provides the information for the new Device to be created (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_create" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_create`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_create`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_delete(self, scope_id, device_id, **kwargs): 'Delete a Device # noqa: E501\n\n Deletes the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_delete(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device to delete. (required)\n :param str device_id: The id of the Device to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_delete_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_delete_with_http_info(scope_id, device_id, **kwargs) return data
-3,057,846,646,600,679,000
Delete a Device # noqa: E501 Deletes the Device specified by the "deviceId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_delete(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device to delete. (required) :param str device_id: The id of the Device to be deleted (required) :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_delete
liang-faan/SmartIOT-Diec
python
def device_delete(self, scope_id, device_id, **kwargs): 'Delete a Device # noqa: E501\n\n Deletes the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_delete(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device to delete. (required)\n :param str device_id: The id of the Device to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_delete_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_delete_with_http_info(scope_id, device_id, **kwargs) return data
def device_delete_with_http_info(self, scope_id, device_id, **kwargs): 'Delete a Device # noqa: E501\n\n Deletes the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_delete_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device to delete. (required)\n :param str device_id: The id of the Device to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_delete" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_delete`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_delete`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-805,387,555,267,307,800
Delete a Device # noqa: E501 Deletes the Device specified by the "deviceId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_delete_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device to delete. (required) :param str device_id: The id of the Device to be deleted (required) :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_delete_with_http_info
liang-faan/SmartIOT-Diec
python
def device_delete_with_http_info(self, scope_id, device_id, **kwargs): 'Delete a Device # noqa: E501\n\n Deletes the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_delete_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device to delete. (required)\n :param str device_id: The id of the Device to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_delete" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_delete`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_delete`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_event_count(self, scope_id, device_id, body, **kwargs): 'Counts the DeviceEvents # noqa: E501\n\n Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_count(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results. (required)\n :param str device_id: The id of the Device in which to count results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_count_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_event_count_with_http_info(scope_id, device_id, body, **kwargs) return data
-6,580,110,145,381,548,000
Counts the DeviceEvents # noqa: E501 Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_count(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to count results. (required) :param str device_id: The id of the Device in which to count results (required) :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required) :return: CountResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_count
liang-faan/SmartIOT-Diec
python
def device_event_count(self, scope_id, device_id, body, **kwargs): 'Counts the DeviceEvents # noqa: E501\n\n Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_count(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results. (required)\n :param str device_id: The id of the Device in which to count results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_count_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_event_count_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_event_count_with_http_info(self, scope_id, device_id, body, **kwargs): 'Counts the DeviceEvents # noqa: E501\n\n Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_count_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results. (required)\n :param str device_id: The id of the Device in which to count results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_count" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_count`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_count`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_event_count`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/_count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CountResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
6,489,751,411,571,599,000
Counts the DeviceEvents # noqa: E501 Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_count_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to count results. (required) :param str device_id: The id of the Device in which to count results (required) :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required) :return: CountResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_count_with_http_info
liang-faan/SmartIOT-Diec
python
def device_event_count_with_http_info(self, scope_id, device_id, body, **kwargs): 'Counts the DeviceEvents # noqa: E501\n\n Counts the DeviceEvents with the given DeviceEventQuery parameter returning the number of matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_count_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to count results. (required)\n :param str device_id: The id of the Device in which to count results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter count results (required)\n :return: CountResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_count" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_count`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_count`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_event_count`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/_count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CountResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_event_delete(self, scope_id, device_id, device_event_id, **kwargs): 'Delete a DeviceEvent # noqa: E501\n\n Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_delete(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: (required)\n :param str device_id: The id of the Device in which to delete the event. (required)\n :param str device_event_id: The id of the DeviceEvent to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_delete_with_http_info(scope_id, device_id, device_event_id, **kwargs) else: data = self.device_event_delete_with_http_info(scope_id, device_id, device_event_id, **kwargs) return data
5,474,595,733,950,122,000
Delete a DeviceEvent # noqa: E501 Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_delete(scope_id, device_id, device_event_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: (required) :param str device_id: The id of the Device in which to delete the event. (required) :param str device_event_id: The id of the DeviceEvent to be deleted (required) :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_delete
liang-faan/SmartIOT-Diec
python
def device_event_delete(self, scope_id, device_id, device_event_id, **kwargs): 'Delete a DeviceEvent # noqa: E501\n\n Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_delete(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: (required)\n :param str device_id: The id of the Device in which to delete the event. (required)\n :param str device_event_id: The id of the DeviceEvent to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_delete_with_http_info(scope_id, device_id, device_event_id, **kwargs) else: data = self.device_event_delete_with_http_info(scope_id, device_id, device_event_id, **kwargs) return data
def device_event_delete_with_http_info(self, scope_id, device_id, device_event_id, **kwargs): 'Delete a DeviceEvent # noqa: E501\n\n Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_delete_with_http_info(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: (required)\n :param str device_id: The id of the Device in which to delete the event. (required)\n :param str device_event_id: The id of the DeviceEvent to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'device_event_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_delete" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_delete`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_delete`') if (('device_event_id' not in params) or (params['device_event_id'] is None)): raise ValueError('Missing the required parameter `device_event_id` when calling `device_event_delete`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('device_event_id' in params): path_params['deviceEventId'] = params['device_event_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/{deviceEventId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-1,940,499,606,731,116,000
Delete a DeviceEvent # noqa: E501 Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_delete_with_http_info(scope_id, device_id, device_event_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: (required) :param str device_id: The id of the Device in which to delete the event. (required) :param str device_event_id: The id of the DeviceEvent to be deleted (required) :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_delete_with_http_info
liang-faan/SmartIOT-Diec
python
def device_event_delete_with_http_info(self, scope_id, device_id, device_event_id, **kwargs): 'Delete a DeviceEvent # noqa: E501\n\n Deletes the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_delete_with_http_info(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: (required)\n :param str device_id: The id of the Device in which to delete the event. (required)\n :param str device_event_id: The id of the DeviceEvent to be deleted (required)\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'device_event_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_delete" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_delete`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_delete`') if (('device_event_id' not in params) or (params['device_event_id'] is None)): raise ValueError('Missing the required parameter `device_event_id` when calling `device_event_delete`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('device_event_id' in params): path_params['deviceEventId'] = params['device_event_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/{deviceEventId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_event_find(self, scope_id, device_id, device_event_id, **kwargs): 'Get an DeviceEvent # noqa: E501\n\n Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_find(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested DeviceEvent. (required)\n :param str device_id: The id of the requested Device (required)\n :param str device_event_id: The id of the requested DeviceEvent (required)\n :return: DeviceEvent\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_find_with_http_info(scope_id, device_id, device_event_id, **kwargs) else: data = self.device_event_find_with_http_info(scope_id, device_id, device_event_id, **kwargs) return data
-3,380,030,283,454,997,500
Get an DeviceEvent # noqa: E501 Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_find(scope_id, device_id, device_event_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the requested DeviceEvent. (required) :param str device_id: The id of the requested Device (required) :param str device_event_id: The id of the requested DeviceEvent (required) :return: DeviceEvent If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_find
liang-faan/SmartIOT-Diec
python
def device_event_find(self, scope_id, device_id, device_event_id, **kwargs): 'Get an DeviceEvent # noqa: E501\n\n Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_find(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested DeviceEvent. (required)\n :param str device_id: The id of the requested Device (required)\n :param str device_event_id: The id of the requested DeviceEvent (required)\n :return: DeviceEvent\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_find_with_http_info(scope_id, device_id, device_event_id, **kwargs) else: data = self.device_event_find_with_http_info(scope_id, device_id, device_event_id, **kwargs) return data
def device_event_find_with_http_info(self, scope_id, device_id, device_event_id, **kwargs): 'Get an DeviceEvent # noqa: E501\n\n Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_find_with_http_info(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested DeviceEvent. (required)\n :param str device_id: The id of the requested Device (required)\n :param str device_event_id: The id of the requested DeviceEvent (required)\n :return: DeviceEvent\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'device_event_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_find" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_find`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_find`') if (('device_event_id' not in params) or (params['device_event_id'] is None)): raise ValueError('Missing the required parameter `device_event_id` when calling `device_event_find`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('device_event_id' in params): path_params['deviceEventId'] = params['device_event_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/{deviceEventId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEvent', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
2,861,939,850,321,296,400
Get an DeviceEvent # noqa: E501 Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_find_with_http_info(scope_id, device_id, device_event_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the requested DeviceEvent. (required) :param str device_id: The id of the requested Device (required) :param str device_event_id: The id of the requested DeviceEvent (required) :return: DeviceEvent If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_find_with_http_info
liang-faan/SmartIOT-Diec
python
def device_event_find_with_http_info(self, scope_id, device_id, device_event_id, **kwargs): 'Get an DeviceEvent # noqa: E501\n\n Returns the DeviceEvent specified by the "deviceEventId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_find_with_http_info(scope_id, device_id, device_event_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested DeviceEvent. (required)\n :param str device_id: The id of the requested Device (required)\n :param str device_event_id: The id of the requested DeviceEvent (required)\n :return: DeviceEvent\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'device_event_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_find" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_find`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_find`') if (('device_event_id' not in params) or (params['device_event_id'] is None)): raise ValueError('Missing the required parameter `device_event_id` when calling `device_event_find`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] if ('device_event_id' in params): path_params['deviceEventId'] = params['device_event_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/{deviceEventId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEvent', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_event_query(self, scope_id, device_id, body, **kwargs): 'Queries the DeviceEvents # noqa: E501\n\n Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_query(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The id of the Device in which to search results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required)\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_query_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_event_query_with_http_info(scope_id, device_id, body, **kwargs) return data
-5,179,534,358,113,968,000
Queries the DeviceEvents # noqa: E501 Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_query(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str device_id: The id of the Device in which to search results (required) :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required) :return: DeviceEventListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_query
liang-faan/SmartIOT-Diec
python
def device_event_query(self, scope_id, device_id, body, **kwargs): 'Queries the DeviceEvents # noqa: E501\n\n Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_query(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The id of the Device in which to search results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required)\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_query_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_event_query_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_event_query_with_http_info(self, scope_id, device_id, body, **kwargs): 'Queries the DeviceEvents # noqa: E501\n\n Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_query_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The id of the Device in which to search results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required)\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_query`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_query`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_event_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/_query', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEventListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-5,266,191,452,683,958,000
Queries the DeviceEvents # noqa: E501 Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_query_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str device_id: The id of the Device in which to search results (required) :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required) :return: DeviceEventListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_query_with_http_info
liang-faan/SmartIOT-Diec
python
def device_event_query_with_http_info(self, scope_id, device_id, body, **kwargs): 'Queries the DeviceEvents # noqa: E501\n\n Queries the DeviceEvents with the given DeviceEvents parameter returning all matching DeviceEvents # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_query_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The id of the Device in which to search results (required)\n :param DeviceEventQuery body: The DeviceEventQuery to use to filter results. (required)\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_query`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_query`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_event_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events/_query', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEventListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_event_simple_query(self, scope_id, device_id, **kwargs): 'Gets the DeviceEvent list in the scope # noqa: E501\n\n Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_simple_query(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The client id to filter results. (required)\n :param str resource: The resource of the DeviceEvent in which to search results\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_simple_query_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_event_simple_query_with_http_info(scope_id, device_id, **kwargs) return data
125,408,700,221,067,660
Gets the DeviceEvent list in the scope # noqa: E501 Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_simple_query(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str device_id: The client id to filter results. (required) :param str resource: The resource of the DeviceEvent in which to search results :param int offset: The result set offset. :param int limit: The result set limit. :return: DeviceEventListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_simple_query
liang-faan/SmartIOT-Diec
python
def device_event_simple_query(self, scope_id, device_id, **kwargs): 'Gets the DeviceEvent list in the scope # noqa: E501\n\n Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_simple_query(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The client id to filter results. (required)\n :param str resource: The resource of the DeviceEvent in which to search results\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_event_simple_query_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_event_simple_query_with_http_info(scope_id, device_id, **kwargs) return data
def device_event_simple_query_with_http_info(self, scope_id, device_id, **kwargs): 'Gets the DeviceEvent list in the scope # noqa: E501\n\n Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_simple_query_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The client id to filter results. (required)\n :param str resource: The resource of the DeviceEvent in which to search results\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'resource', 'offset', 'limit'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_simple_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_simple_query`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_simple_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('resource' in params): query_params.append(('resource', params['resource'])) if ('offset' in params): query_params.append(('offset', params['offset'])) if ('limit' in params): query_params.append(('limit', params['limit'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEventListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
4,728,761,236,892,147,000
Gets the DeviceEvent list in the scope # noqa: E501 Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_event_simple_query_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str device_id: The client id to filter results. (required) :param str resource: The resource of the DeviceEvent in which to search results :param int offset: The result set offset. :param int limit: The result set limit. :return: DeviceEventListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_event_simple_query_with_http_info
liang-faan/SmartIOT-Diec
python
def device_event_simple_query_with_http_info(self, scope_id, device_id, **kwargs): 'Gets the DeviceEvent list in the scope # noqa: E501\n\n Returns the list of all the deviceEvents associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_event_simple_query_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str device_id: The client id to filter results. (required)\n :param str resource: The resource of the DeviceEvent in which to search results\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceEventListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'resource', 'offset', 'limit'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_event_simple_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_event_simple_query`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_event_simple_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('resource' in params): query_params.append(('resource', params['resource'])) if ('offset' in params): query_params.append(('offset', params['offset'])) if ('limit' in params): query_params.append(('limit', params['limit'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/events', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceEventListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_find(self, scope_id, device_id, **kwargs): 'Get a Device # noqa: E501\n\n Returns the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_find(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested Device (required)\n :param str device_id: The id of the requested Device (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_find_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_find_with_http_info(scope_id, device_id, **kwargs) return data
-1,114,400,145,894,346,600
Get a Device # noqa: E501 Returns the Device specified by the "deviceId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_find(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the requested Device (required) :param str device_id: The id of the requested Device (required) :return: Device If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_find
liang-faan/SmartIOT-Diec
python
def device_find(self, scope_id, device_id, **kwargs): 'Get a Device # noqa: E501\n\n Returns the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_find(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested Device (required)\n :param str device_id: The id of the requested Device (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_find_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_find_with_http_info(scope_id, device_id, **kwargs) return data
def device_find_with_http_info(self, scope_id, device_id, **kwargs): 'Get a Device # noqa: E501\n\n Returns the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_find_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested Device (required)\n :param str device_id: The id of the requested Device (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_find" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_find`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_find`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
7,551,122,982,849,463,000
Get a Device # noqa: E501 Returns the Device specified by the "deviceId" path parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_find_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the requested Device (required) :param str device_id: The id of the requested Device (required) :return: Device If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_find_with_http_info
liang-faan/SmartIOT-Diec
python
def device_find_with_http_info(self, scope_id, device_id, **kwargs): 'Get a Device # noqa: E501\n\n Returns the Device specified by the "deviceId" path parameter. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_find_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the requested Device (required)\n :param str device_id: The id of the requested Device (required)\n :return: Device\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_find" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_find`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_find`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_package_download(self, scope_id, device_id, body, **kwargs): 'Installs a package # noqa: E501\n\n Installs a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_download(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_download_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_package_download_with_http_info(scope_id, device_id, body, **kwargs) return data
2,519,374,063,268,564,500
Installs a package # noqa: E501 Installs a package into the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_download(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required) :param int timeout: The timeout of the operation :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_download
liang-faan/SmartIOT-Diec
python
def device_package_download(self, scope_id, device_id, body, **kwargs): 'Installs a package # noqa: E501\n\n Installs a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_download(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_download_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_package_download_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_package_download_with_http_info(self, scope_id, device_id, body, **kwargs): 'Installs a package # noqa: E501\n\n Installs a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_download_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_download" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_download`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_download`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_package_download`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages/_download', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-9,219,450,432,813,025,000
Installs a package # noqa: E501 Installs a package into the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_download_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required) :param int timeout: The timeout of the operation :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_download_with_http_info
liang-faan/SmartIOT-Diec
python
def device_package_download_with_http_info(self, scope_id, device_id, body, **kwargs): 'Installs a package # noqa: E501\n\n Installs a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_download_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageDownloadRequest body: Mandatory object with all the informations needed to download and install a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_download" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_download`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_download`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_package_download`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages/_download', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_package_get(self, scope_id, device_id, **kwargs): 'Gets a list of packages # noqa: E501\n\n Returns the list of all the packages installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DevicePackages\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_package_get_with_http_info(scope_id, device_id, **kwargs) return data
4,793,566,075,603,832,000
Gets a list of packages # noqa: E501 Returns the list of all the packages installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation :return: DevicePackages If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_get
liang-faan/SmartIOT-Diec
python
def device_package_get(self, scope_id, device_id, **kwargs): 'Gets a list of packages # noqa: E501\n\n Returns the list of all the packages installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DevicePackages\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_package_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_package_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of packages # noqa: E501\n\n Returns the list of all the packages installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DevicePackages\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DevicePackages', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
6,249,429,758,594,477,000
Gets a list of packages # noqa: E501 Returns the list of all the packages installed on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation :return: DevicePackages If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_package_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of packages # noqa: E501\n\n Returns the list of all the packages installed on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DevicePackages\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DevicePackages', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_package_uninstall(self, scope_id, device_id, body, **kwargs): 'Uninstalls a package # noqa: E501\n\n Uninstalls a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_uninstall(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_uninstall_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_package_uninstall_with_http_info(scope_id, device_id, body, **kwargs) return data
-2,788,760,877,608,698,000
Uninstalls a package # noqa: E501 Uninstalls a package into the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_uninstall(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required) :param int timeout: The timeout of the operation :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_uninstall
liang-faan/SmartIOT-Diec
python
def device_package_uninstall(self, scope_id, device_id, body, **kwargs): 'Uninstalls a package # noqa: E501\n\n Uninstalls a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_uninstall(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_package_uninstall_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_package_uninstall_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_package_uninstall_with_http_info(self, scope_id, device_id, body, **kwargs): 'Uninstalls a package # noqa: E501\n\n Uninstalls a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_uninstall_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_uninstall" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_uninstall`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_uninstall`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_package_uninstall`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages/_uninstall', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-5,735,233,722,673,145,000
Uninstalls a package # noqa: E501 Uninstalls a package into the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_package_uninstall_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the Device (required) :param str device_id: The id of the device (required) :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required) :param int timeout: The timeout of the operation :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_package_uninstall_with_http_info
liang-faan/SmartIOT-Diec
python
def device_package_uninstall_with_http_info(self, scope_id, device_id, body, **kwargs): 'Uninstalls a package # noqa: E501\n\n Uninstalls a package into the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_package_uninstall_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the Device (required)\n :param str device_id: The id of the device (required)\n :param DevicePackageUninstallRequest body: Mandatory object with all the informations needed to uninstall a package (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_package_uninstall" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_package_uninstall`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_package_uninstall`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_package_uninstall`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/packages/_uninstall', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_query(self, scope_id, body, **kwargs): 'Queries the Devices # noqa: E501\n\n Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_query(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param DeviceQuery body: The DeviceQuery to use to filter results. (required)\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_query_with_http_info(scope_id, body, **kwargs) else: data = self.device_query_with_http_info(scope_id, body, **kwargs) return data
-6,105,973,237,326,856,000
Queries the Devices # noqa: E501 Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_query(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param DeviceQuery body: The DeviceQuery to use to filter results. (required) :return: DeviceListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_query
liang-faan/SmartIOT-Diec
python
def device_query(self, scope_id, body, **kwargs): 'Queries the Devices # noqa: E501\n\n Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_query(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param DeviceQuery body: The DeviceQuery to use to filter results. (required)\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_query_with_http_info(scope_id, body, **kwargs) else: data = self.device_query_with_http_info(scope_id, body, **kwargs) return data
def device_query_with_http_info(self, scope_id, body, **kwargs): 'Queries the Devices # noqa: E501\n\n Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_query_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param DeviceQuery body: The DeviceQuery to use to filter results. (required)\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_query`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/_query', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-125,969,162,650,371,340
Queries the Devices # noqa: E501 Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_query_with_http_info(scope_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param DeviceQuery body: The DeviceQuery to use to filter results. (required) :return: DeviceListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_query_with_http_info
liang-faan/SmartIOT-Diec
python
def device_query_with_http_info(self, scope_id, body, **kwargs): 'Queries the Devices # noqa: E501\n\n Queries the Devices with the given Devices parameter returning all matching Devices # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_query_with_http_info(scope_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param DeviceQuery body: The DeviceQuery to use to filter results. (required)\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'body'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_query`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/xml', 'application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/xml', 'application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/_query', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_request_send(self, scope_id, device_id, body, **kwargs): 'Sends a request # noqa: E501\n\n Sends a request message to a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_request_send(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param JsonGenericRequestMessage body: The input request (required)\n :param int timeout: The timeout of the request execution\n :return: JsonGenericResponseMessage\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_request_send_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_request_send_with_http_info(scope_id, device_id, body, **kwargs) return data
-1,451,493,951,784,766,700
Sends a request # noqa: E501 Sends a request message to a device # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_request_send(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param JsonGenericRequestMessage body: The input request (required) :param int timeout: The timeout of the request execution :return: JsonGenericResponseMessage If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_request_send
liang-faan/SmartIOT-Diec
python
def device_request_send(self, scope_id, device_id, body, **kwargs): 'Sends a request # noqa: E501\n\n Sends a request message to a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_request_send(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param JsonGenericRequestMessage body: The input request (required)\n :param int timeout: The timeout of the request execution\n :return: JsonGenericResponseMessage\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_request_send_with_http_info(scope_id, device_id, body, **kwargs) else: data = self.device_request_send_with_http_info(scope_id, device_id, body, **kwargs) return data
def device_request_send_with_http_info(self, scope_id, device_id, body, **kwargs): 'Sends a request # noqa: E501\n\n Sends a request message to a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_request_send_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param JsonGenericRequestMessage body: The input request (required)\n :param int timeout: The timeout of the request execution\n :return: JsonGenericResponseMessage\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_request_send" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_request_send`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_request_send`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_request_send`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/requests', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='JsonGenericResponseMessage', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
4,736,477,474,811,742,000
Sends a request # noqa: E501 Sends a request message to a device # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_request_send_with_http_info(scope_id, device_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param JsonGenericRequestMessage body: The input request (required) :param int timeout: The timeout of the request execution :return: JsonGenericResponseMessage If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_request_send_with_http_info
liang-faan/SmartIOT-Diec
python
def device_request_send_with_http_info(self, scope_id, device_id, body, **kwargs): 'Sends a request # noqa: E501\n\n Sends a request message to a device # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_request_send_with_http_info(scope_id, device_id, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param JsonGenericRequestMessage body: The input request (required)\n :param int timeout: The timeout of the request execution\n :return: JsonGenericResponseMessage\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'body', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_request_send" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_request_send`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_request_send`') if (('body' not in params) or (params['body'] is None)): raise ValueError('Missing the required parameter `body` when calling `device_request_send`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in params): body_params = params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/requests', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='JsonGenericResponseMessage', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_simple_query(self, scope_id, **kwargs): 'Gets the Device list in the scope # noqa: E501\n\n Returns the list of all the devices associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_simple_query(scope_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str tag_id: The tag id to filter results.\n :param str client_id: The client id to filter results.\n :param str status: The connection status to filter results.\n :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_simple_query_with_http_info(scope_id, **kwargs) else: data = self.device_simple_query_with_http_info(scope_id, **kwargs) return data
-6,437,109,454,804,137,000
Gets the Device list in the scope # noqa: E501 Returns the list of all the devices associated to the current selected scope. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_simple_query(scope_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str tag_id: The tag id to filter results. :param str client_id: The client id to filter results. :param str status: The connection status to filter results. :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent :param int offset: The result set offset. :param int limit: The result set limit. :return: DeviceListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_simple_query
liang-faan/SmartIOT-Diec
python
def device_simple_query(self, scope_id, **kwargs): 'Gets the Device list in the scope # noqa: E501\n\n Returns the list of all the devices associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_simple_query(scope_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str tag_id: The tag id to filter results.\n :param str client_id: The client id to filter results.\n :param str status: The connection status to filter results.\n :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_simple_query_with_http_info(scope_id, **kwargs) else: data = self.device_simple_query_with_http_info(scope_id, **kwargs) return data
def device_simple_query_with_http_info(self, scope_id, **kwargs): 'Gets the Device list in the scope # noqa: E501\n\n Returns the list of all the devices associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_simple_query_with_http_info(scope_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str tag_id: The tag id to filter results.\n :param str client_id: The client id to filter results.\n :param str status: The connection status to filter results.\n :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'tag_id', 'client_id', 'status', 'fetch_attributes', 'offset', 'limit'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_simple_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_simple_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] if ('tag_id' in params): query_params.append(('tagId', params['tag_id'])) if ('client_id' in params): query_params.append(('clientId', params['client_id'])) if ('status' in params): query_params.append(('status', params['status'])) if ('fetch_attributes' in params): query_params.append(('fetchAttributes', params['fetch_attributes'])) collection_formats['fetchAttributes'] = 'multi' if ('offset' in params): query_params.append(('offset', params['offset'])) if ('limit' in params): query_params.append(('limit', params['limit'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-6,635,494,352,271,007,000
Gets the Device list in the scope # noqa: E501 Returns the list of all the devices associated to the current selected scope. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_simple_query_with_http_info(scope_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId in which to search results. (required) :param str tag_id: The tag id to filter results. :param str client_id: The client id to filter results. :param str status: The connection status to filter results. :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent :param int offset: The result set offset. :param int limit: The result set limit. :return: DeviceListResult If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_simple_query_with_http_info
liang-faan/SmartIOT-Diec
python
def device_simple_query_with_http_info(self, scope_id, **kwargs): 'Gets the Device list in the scope # noqa: E501\n\n Returns the list of all the devices associated to the current selected scope. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_simple_query_with_http_info(scope_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId in which to search results. (required)\n :param str tag_id: The tag id to filter results.\n :param str client_id: The client id to filter results.\n :param str status: The connection status to filter results.\n :param list[str] fetch_attributes: Additional attributes to be returned. Allowed values: connection, lastEvent\n :param int offset: The result set offset.\n :param int limit: The result set limit.\n :return: DeviceListResult\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'tag_id', 'client_id', 'status', 'fetch_attributes', 'offset', 'limit'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_simple_query" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_simple_query`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] query_params = [] if ('tag_id' in params): query_params.append(('tagId', params['tag_id'])) if ('client_id' in params): query_params.append(('clientId', params['client_id'])) if ('status' in params): query_params.append(('status', params['status'])) if ('fetch_attributes' in params): query_params.append(('fetchAttributes', params['fetch_attributes'])) collection_formats['fetchAttributes'] = 'multi' if ('offset' in params): query_params.append(('offset', params['offset'])) if ('limit' in params): query_params.append(('limit', params['limit'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceListResult', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_snapshot_get(self, scope_id, device_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Returns the list of all the Snapshots available on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DeviceSnapshots\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_snapshot_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_snapshot_get_with_http_info(scope_id, device_id, **kwargs) return data
5,262,278,053,372,201,000
Gets a list of snapshots # noqa: E501 Returns the list of all the Snapshots available on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_snapshot_get(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation :return: DeviceSnapshots If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_snapshot_get
liang-faan/SmartIOT-Diec
python
def device_snapshot_get(self, scope_id, device_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Returns the list of all the Snapshots available on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_get(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DeviceSnapshots\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_snapshot_get_with_http_info(scope_id, device_id, **kwargs) else: data = self.device_snapshot_get_with_http_info(scope_id, device_id, **kwargs) return data
def device_snapshot_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Returns the list of all the Snapshots available on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DeviceSnapshots\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_snapshot_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_snapshot_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_snapshot_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/snapshots', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceSnapshots', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
-2,310,547,619,060,223,000
Gets a list of snapshots # noqa: E501 Returns the list of all the Snapshots available on the device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_snapshot_get_with_http_info(scope_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param int timeout: The timeout of the operation :return: DeviceSnapshots If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_snapshot_get_with_http_info
liang-faan/SmartIOT-Diec
python
def device_snapshot_get_with_http_info(self, scope_id, device_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Returns the list of all the Snapshots available on the device. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_get_with_http_info(scope_id, device_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param int timeout: The timeout of the operation\n :return: DeviceSnapshots\n If the method is called asynchronously,\n returns the request thread.\n ' all_params = ['scope_id', 'device_id', 'timeout'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for (key, val) in six.iteritems(params['kwargs']): if (key not in all_params): raise TypeError(("Got an unexpected keyword argument '%s' to method device_snapshot_get" % key)) params[key] = val del params['kwargs'] if (('scope_id' not in params) or (params['scope_id'] is None)): raise ValueError('Missing the required parameter `scope_id` when calling `device_snapshot_get`') if (('device_id' not in params) or (params['device_id'] is None)): raise ValueError('Missing the required parameter `device_id` when calling `device_snapshot_get`') collection_formats = {} path_params = {} if ('scope_id' in params): path_params['scopeId'] = params['scope_id'] if ('device_id' in params): path_params['deviceId'] = params['device_id'] query_params = [] if ('timeout' in params): query_params.append(('timeout', params['timeout'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/xml']) auth_settings = ['kapuaAccessToken'] return self.api_client.call_api('/{scopeId}/devices/{deviceId}/snapshots', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceSnapshots', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def device_snapshot_rollback(self, scope_id, device_id, snapshot_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_rollback(scope_id, device_id, snapshot_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param str snapshot_id: the ID of the snapshot to rollback to (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_snapshot_rollback_with_http_info(scope_id, device_id, snapshot_id, **kwargs) else: data = self.device_snapshot_rollback_with_http_info(scope_id, device_id, snapshot_id, **kwargs) return data
6,902,305,866,777,795,000
Gets a list of snapshots # noqa: E501 Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.device_snapshot_rollback(scope_id, device_id, snapshot_id, async_req=True) >>> result = thread.get() :param async_req bool :param str scope_id: The ScopeId of the device (required) :param str device_id: The id of the device (required) :param str snapshot_id: the ID of the snapshot to rollback to (required) :param int timeout: The timeout of the operation :return: None If the method is called asynchronously, returns the request thread.
kapua-client/python-client/swagger_client/api/devices_api.py
device_snapshot_rollback
liang-faan/SmartIOT-Diec
python
def device_snapshot_rollback(self, scope_id, device_id, snapshot_id, **kwargs): 'Gets a list of snapshots # noqa: E501\n\n Updates the configuration of a device rolling back a given snapshot ID. # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.device_snapshot_rollback(scope_id, device_id, snapshot_id, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool\n :param str scope_id: The ScopeId of the device (required)\n :param str device_id: The id of the device (required)\n :param str snapshot_id: the ID of the snapshot to rollback to (required)\n :param int timeout: The timeout of the operation\n :return: None\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.device_snapshot_rollback_with_http_info(scope_id, device_id, snapshot_id, **kwargs) else: data = self.device_snapshot_rollback_with_http_info(scope_id, device_id, snapshot_id, **kwargs) return data