query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Delete Tier1 policy service instance Delete Tier1 policy service instance
def delete_tier1_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_0" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#delete_tier1_policy_service_instance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n ensure_service!\n service.delete_instance path\n true\n end", "def delete\n self.class.delete_service_instance(@service_name, @name)\n end", "def delete_instance instance_id\n instances.delete_instance name: instance_path(instance_id)\n end...
[ "0.65392697", "0.6370457", "0.6169827", "0.61428994", "0.6132486", "0.60245675", "0.60216844", "0.5935967", "0.58969474", "0.5885702", "0.58853835", "0.5871486", "0.586544", "0.583564", "0.5834902", "0.58341914", "0.57823515", "0.5774709", "0.5746717", "0.57459164", "0.573958...
0.58118004
16
Delete Tier1 service instance endpoint Delete Tier1 service instance endpoint
def delete_tier1_policy_service_instance_endpoint(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) delete_tier1_policy_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n self.class.delete_service_instance(@service_name, @name)\n end", "def delete\n ensure_service!\n service.delete_instance path\n true\n end", "def delete endpoint\n do_request :delete, endpoint\n end", "def delete_instance instance_id\n i...
[ "0.69459134", "0.69426256", "0.66297525", "0.63652927", "0.63462526", "0.6313143", "0.62876856", "0.62580794", "0.6239327", "0.6239327", "0.6239327", "0.6234806", "0.62201583", "0.615115", "0.61015517", "0.60904086", "0.6065493", "0.5996408", "0.59692955", "0.5960244", "0.595...
0.0
-1
Delete Tier1 service instance endpoint Delete Tier1 service instance endpoint
def delete_tier1_policy_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#delete_tier1_policy_service_instance_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n self.class.delete_service_instance(@service_name, @name)\n end", "def delete\n ensure_service!\n service.delete_instance path\n true\n end", "def delete endpoint\n do_request :delete, endpoint\n end", "def delete_instance instance_id\n i...
[ "0.69459134", "0.69426256", "0.66297525", "0.63652927", "0.63462526", "0.6313143", "0.62876856", "0.62580794", "0.6239327", "0.6239327", "0.6239327", "0.6234806", "0.62201583", "0.615115", "0.61015517", "0.60904086", "0.5996408", "0.59692955", "0.5960244", "0.5954344", "0.594...
0.6065493
16
Delete Tier1 service instance endpoint Delete Tier1 service instance endpoint
def delete_tier1_policy_service_instance_endpoint_0(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) delete_tier1_policy_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n self.class.delete_service_instance(@service_name, @name)\n end", "def delete\n ensure_service!\n service.delete_instance path\n true\n end", "def delete endpoint\n do_request :delete, endpoint\n end", "def delete_instance instance_id\n i...
[ "0.6946954", "0.6943312", "0.6631016", "0.6367239", "0.6347225", "0.6314414", "0.62890327", "0.6258767", "0.6240179", "0.6240179", "0.6240179", "0.62361693", "0.62209016", "0.61527526", "0.6099607", "0.60916257", "0.6063585", "0.59976673", "0.5970206", "0.5960316", "0.5954715...
0.0
-1
Delete Tier1 service instance endpoint Delete Tier1 service instance endpoint
def delete_tier1_policy_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.delete_tier1_policy_service_instance_endpoint_0" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#delete_tier1_policy_service_instance_endpoint_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n self.class.delete_service_instance(@service_name, @name)\n end", "def delete\n ensure_service!\n service.delete_instance path\n true\n end", "def delete endpoint\n do_request :delete, endpoint\n end", "def delete_instance instance_id\n i...
[ "0.69459134", "0.69426256", "0.66297525", "0.63652927", "0.63462526", "0.6313143", "0.62876856", "0.62580794", "0.6239327", "0.6239327", "0.6239327", "0.6234806", "0.62201583", "0.615115", "0.60904086", "0.6065493", "0.5996408", "0.59692955", "0.5960244", "0.5954344", "0.5947...
0.61015517
14
Read all Tier1 BYOD service instance objects under a tier1 Read all Tier1 BYOD service instance objects under a tier1
def list_tier1_byod_policy_service_instances(tier_1_id, locale_service_id, opts = {}) data, _status_code, _headers = list_tier1_byod_policy_service_instances_with_http_info(tier_1_id, locale_service_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1 ...'\n ...
[ "0.583277", "0.57981855", "0.5736026", "0.56833744", "0.56744635", "0.55996484", "0.5591952", "0.5577612", "0.5427435", "0.5398957", "0.5334163", "0.52829367", "0.5264676", "0.5261105", "0.5245921", "0.52254397", "0.5207497", "0.52049446", "0.5195965", "0.51733184", "0.516950...
0.5187572
19
Read all Tier1 BYOD service instance objects under a tier1 Read all Tier1 BYOD service instance objects under a tier1
def list_tier1_byod_policy_service_instances_with_http_info(tier_1_id, locale_service_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances, must be greater than or equal to 0.' end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ByodPolicyServiceInstanceListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#list_tier1_byod_policy_service_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1 ...'\n ...
[ "0.5832485", "0.5798996", "0.57366526", "0.56839454", "0.56741834", "0.5599827", "0.55926055", "0.55782354", "0.5427398", "0.5399882", "0.5334583", "0.528343", "0.52651143", "0.52611244", "0.52463603", "0.5225432", "0.5208653", "0.52049226", "0.5196243", "0.5188682", "0.51744...
0.50790185
30
Read all Tier1 BYOD service instance objects under a tier1 Read all Tier1 BYOD service instance objects under a tier1
def list_tier1_byod_policy_service_instances_0(tier_1_id, locale_service_id, opts = {}) data, _status_code, _headers = list_tier1_byod_policy_service_instances_0_with_http_info(tier_1_id, locale_service_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1 ...'\n ...
[ "0.583517", "0.58020633", "0.5740452", "0.56878227", "0.5676972", "0.5596582", "0.55932826", "0.5581221", "0.5425261", "0.5396678", "0.5335434", "0.5286217", "0.52677774", "0.5263029", "0.524893", "0.5227057", "0.5211213", "0.52083826", "0.5194415", "0.518818", "0.51770973", ...
0.49789524
37
Read all Tier1 BYOD service instance objects under a tier1 Read all Tier1 BYOD service instance objects under a tier1
def list_tier1_byod_policy_service_instances_0_with_http_info(tier_1_id, locale_service_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances_0" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances_0, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_byod_policy_service_instances_0, must be greater than or equal to 0.' end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ByodPolicyServiceInstanceListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#list_tier1_byod_policy_service_instances_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1 ...'\n ...
[ "0.58344865", "0.5798938", "0.57375133", "0.5684942", "0.5676201", "0.5599036", "0.559275", "0.5578264", "0.5426529", "0.5397648", "0.5334831", "0.5284513", "0.5266344", "0.52624005", "0.5247583", "0.5226673", "0.5208993", "0.52069324", "0.5195821", "0.518867", "0.517481", ...
0.50212824
34
List all Tier1 service instance endpoint List all Tier1 service instance endpoint
def list_tier1_policy_service_instance_endpoints(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = list_tier1_policy_service_instance_endpoints_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoints_list\n get \"endpoints\"\n end", "def index\n endpoint(get(services_url).body)\n end", "def endpoints\n EndpointRegistry[id]\n end", "def endpoints; end", "def index\n @port_services = PortService.all\n end", "def list()\n puts \"Listing all endpoints\"\n l...
[ "0.68617404", "0.6665617", "0.64297575", "0.63295543", "0.61919904", "0.61715585", "0.6124001", "0.6094538", "0.60799533", "0.6036918", "0.6034845", "0.6015748", "0.60012597", "0.5964773", "0.595692", "0.59415877", "0.5925453", "0.5922914", "0.59045476", "0.58989143", "0.5892...
0.0
-1
List all Tier1 service instance endpoint List all Tier1 service instance endpoint
def list_tier1_policy_service_instance_endpoints_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints, must be greater than or equal to 0.' end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ServiceInstanceEndpointListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#list_tier1_policy_service_instance_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoints_list\n get \"endpoints\"\n end", "def index\n endpoint(get(services_url).body)\n end", "def endpoints\n EndpointRegistry[id]\n end", "def endpoints; end", "def index\n @port_services = PortService.all\n end", "def list()\n puts \"Listing all endpoints\"\n l...
[ "0.68617404", "0.6665617", "0.64297575", "0.63295543", "0.61919904", "0.61715585", "0.6124001", "0.6094538", "0.60799533", "0.6036918", "0.6034845", "0.6015748", "0.60012597", "0.5964773", "0.595692", "0.59415877", "0.5925453", "0.5922914", "0.59045476", "0.58989143", "0.5892...
0.0
-1
List all Tier1 service instance endpoint List all Tier1 service instance endpoint
def list_tier1_policy_service_instance_endpoints_0(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = list_tier1_policy_service_instance_endpoints_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoints_list\n get \"endpoints\"\n end", "def index\n endpoint(get(services_url).body)\n end", "def endpoints\n EndpointRegistry[id]\n end", "def endpoints; end", "def index\n @port_services = PortService.all\n end", "def list()\n puts \"Listing all endpoints\"\n l...
[ "0.68601507", "0.6665762", "0.6428642", "0.63292533", "0.6192408", "0.617035", "0.61239564", "0.6095005", "0.60789734", "0.6036646", "0.60354614", "0.6014171", "0.60001165", "0.59654695", "0.5957459", "0.59418905", "0.5925882", "0.5923631", "0.5904724", "0.58986443", "0.58929...
0.0
-1
List all Tier1 service instance endpoint List all Tier1 service instance endpoint
def list_tier1_policy_service_instance_endpoints_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.list_tier1_policy_service_instance_endpoints_0, must be greater than or equal to 0.' end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ServiceInstanceEndpointListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#list_tier1_policy_service_instance_endpoints_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoints_list\n get \"endpoints\"\n end", "def index\n endpoint(get(services_url).body)\n end", "def endpoints\n EndpointRegistry[id]\n end", "def endpoints; end", "def index\n @port_services = PortService.all\n end", "def list()\n puts \"Listing all endpoints\"\n l...
[ "0.68617404", "0.6665617", "0.64297575", "0.63295543", "0.61919904", "0.61715585", "0.6124001", "0.6094538", "0.60799533", "0.6036918", "0.6034845", "0.6015748", "0.60012597", "0.5964773", "0.595692", "0.59415877", "0.5925453", "0.5922914", "0.59045476", "0.58989143", "0.5892...
0.0
-1
Create Tier1 BYOD service instance Create Tier1 BYOD Service Instance which represents instance of service definition created on manager.
def patch_tier1_byod_policy_service_instance(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts = {}) patch_tier1_byod_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n super(@@service)\n end", "def create_service_instance(name, space_guid, service_plan_id)\n service_plan_instance = CFoundry::V2::ServicePlan.new(service_plan_id, @client)\n service_instance = @client.managed_service_instance\n service_instance.name = name\n service_instance.servi...
[ "0.641914", "0.6407304", "0.6389548", "0.6346785", "0.6294748", "0.61593324", "0.61350405", "0.6092666", "0.59620816", "0.59549654", "0.59512955", "0.58955264", "0.5891125", "0.5820004", "0.5810055", "0.5797039", "0.5743813", "0.5697255", "0.56704134", "0.56704134", "0.562956...
0.0
-1
Create Tier1 BYOD service instance Create Tier1 BYOD Service Instance which represents instance of service definition created on manager.
def patch_tier1_byod_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance" end # verify the required parameter 'byod_policy_service_instance' is set if @api_client.config.client_side_validation && byod_policy_service_instance.nil? fail ArgumentError, "Missing the required parameter 'byod_policy_service_instance' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(byod_policy_service_instance) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_byod_policy_service_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n super(@@service)\n end", "def create_service_instance(name, space_guid, service_plan_id)\n service_plan_instance = CFoundry::V2::ServicePlan.new(service_plan_id, @client)\n service_instance = @client.managed_service_instance\n service_instance.name = name\n service_instance.servi...
[ "0.641914", "0.6407304", "0.6389548", "0.6346785", "0.6294748", "0.61593324", "0.61350405", "0.6092666", "0.59620816", "0.59549654", "0.59512955", "0.58955264", "0.5891125", "0.5820004", "0.5810055", "0.5797039", "0.5743813", "0.5697255", "0.56704134", "0.56704134", "0.562956...
0.0
-1
Create Tier1 BYOD service instance Create Tier1 BYOD Service Instance which represents instance of service definition created on manager.
def patch_tier1_byod_policy_service_instance_0(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts = {}) patch_tier1_byod_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n super(@@service)\n end", "def create_service_instance(name, space_guid, service_plan_id)\n service_plan_instance = CFoundry::V2::ServicePlan.new(service_plan_id, @client)\n service_instance = @client.managed_service_instance\n service_instance.name = name\n service_instance.servi...
[ "0.6418922", "0.64067155", "0.6388593", "0.63469553", "0.62953347", "0.6158955", "0.6135113", "0.6091988", "0.59614605", "0.5954381", "0.59508234", "0.5894851", "0.5890975", "0.58192974", "0.58097225", "0.5796319", "0.5743458", "0.5697263", "0.56687385", "0.56687385", "0.5630...
0.0
-1
Create Tier1 BYOD service instance Create Tier1 BYOD Service Instance which represents instance of service definition created on manager.
def patch_tier1_byod_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, byod_policy_service_instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance_0" end # verify the required parameter 'byod_policy_service_instance' is set if @api_client.config.client_side_validation && byod_policy_service_instance.nil? fail ArgumentError, "Missing the required parameter 'byod_policy_service_instance' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_byod_policy_service_instance_0" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(byod_policy_service_instance) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_byod_policy_service_instance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n super(@@service)\n end", "def create_service_instance(name, space_guid, service_plan_id)\n service_plan_instance = CFoundry::V2::ServicePlan.new(service_plan_id, @client)\n service_instance = @client.managed_service_instance\n service_instance.name = name\n service_instance.servi...
[ "0.641914", "0.6407304", "0.6389548", "0.6346785", "0.6294748", "0.61593324", "0.61350405", "0.6092666", "0.59620816", "0.59549654", "0.59512955", "0.58955264", "0.5891125", "0.5820004", "0.5810055", "0.5797039", "0.5743813", "0.5697255", "0.56704134", "0.56704134", "0.562956...
0.0
-1
Create Tier1 service instance Create Tier1 Service Instance. Please note that, only display_name, description and deployment_spec_name are allowed to be modified in an exisiting entity. If the deployment spec name is changed, it will trigger the upgrade operation for the SVMs.
def patch_tier1_policy_service_instance(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts = {}) patch_tier1_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(name, config)\n # @step: validate the user defined options\n validate(config)\n\n # @step: create the infrastructure deployment\n begin\n provision_aks(name, config)\n rescue StandardError => e\n raise InfrastructureError, \"failed to provision cluste...
[ "0.59663546", "0.59428483", "0.57729685", "0.5762015", "0.5721399", "0.5680516", "0.567849", "0.5611673", "0.559242", "0.5556285", "0.5544761", "0.5526245", "0.54776007", "0.54724807", "0.54699993", "0.5415827", "0.5376937", "0.536614", "0.5365983", "0.533006", "0.527945", ...
0.0
-1
Create Tier1 service instance Create Tier1 Service Instance. Please note that, only display_name, description and deployment_spec_name are allowed to be modified in an exisiting entity. If the deployment spec name is changed, it will trigger the upgrade operation for the SVMs.
def patch_tier1_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance" end # verify the required parameter 'policy_service_instance' is set if @api_client.config.client_side_validation && policy_service_instance.nil? fail ArgumentError, "Missing the required parameter 'policy_service_instance' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(policy_service_instance) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_policy_service_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(name, config)\n # @step: validate the user defined options\n validate(config)\n\n # @step: create the infrastructure deployment\n begin\n provision_aks(name, config)\n rescue StandardError => e\n raise InfrastructureError, \"failed to provision cluste...
[ "0.5966553", "0.5942494", "0.57729596", "0.5761643", "0.5721342", "0.5680341", "0.56783146", "0.56118655", "0.5593257", "0.55579007", "0.5545643", "0.55279666", "0.5478629", "0.5472563", "0.54699564", "0.54158574", "0.5377489", "0.53661704", "0.53661686", "0.5329897", "0.5280...
0.5183686
26
Create Tier1 service instance Create Tier1 Service Instance. Please note that, only display_name, description and deployment_spec_name are allowed to be modified in an exisiting entity. If the deployment spec name is changed, it will trigger the upgrade operation for the SVMs.
def patch_tier1_policy_service_instance_0(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts = {}) patch_tier1_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(name, config)\n # @step: validate the user defined options\n validate(config)\n\n # @step: create the infrastructure deployment\n begin\n provision_aks(name, config)\n rescue StandardError => e\n raise InfrastructureError, \"failed to provision cluste...
[ "0.596693", "0.59403276", "0.57717735", "0.57595915", "0.57200825", "0.5679176", "0.56772083", "0.5611516", "0.5593353", "0.55568975", "0.55453396", "0.5526963", "0.5478489", "0.54708993", "0.54702497", "0.5414199", "0.53775334", "0.53662765", "0.53654397", "0.53299165", "0.5...
0.0
-1
Create Tier1 service instance Create Tier1 Service Instance. Please note that, only display_name, description and deployment_spec_name are allowed to be modified in an exisiting entity. If the deployment spec name is changed, it will trigger the upgrade operation for the SVMs.
def patch_tier1_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, policy_service_instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance_0" end # verify the required parameter 'policy_service_instance' is set if @api_client.config.client_side_validation && policy_service_instance.nil? fail ArgumentError, "Missing the required parameter 'policy_service_instance' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_policy_service_instance_0" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(policy_service_instance) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_policy_service_instance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(name, config)\n # @step: validate the user defined options\n validate(config)\n\n # @step: create the infrastructure deployment\n begin\n provision_aks(name, config)\n rescue StandardError => e\n raise InfrastructureError, \"failed to provision cluste...
[ "0.5966708", "0.5942072", "0.57729286", "0.5761244", "0.5721337", "0.56805056", "0.56785", "0.5611529", "0.5593497", "0.55571204", "0.5545514", "0.55265534", "0.54787594", "0.547161", "0.5469635", "0.5414918", "0.5377364", "0.5366835", "0.5365857", "0.5330026", "0.52807426", ...
0.50953096
42
Create Tier1 service instance endpoint Create Tier1 Service instance endpoint.
def patch_tier1_service_instance_endpoint(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {}) patch_tier1_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInsta...
[ "0.6255446", "0.6160107", "0.59500915", "0.5949246", "0.5872546", "0.58042", "0.5798773", "0.57841635", "0.5781504", "0.5667666", "0.5664266", "0.56641316", "0.55803627", "0.55576456", "0.5546595", "0.5509095", "0.5476701", "0.5467246", "0.5462339", "0.5422024", "0.54111105",...
0.0
-1
Create Tier1 service instance endpoint Create Tier1 Service instance endpoint.
def patch_tier1_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint" end # verify the required parameter 'service_instance_endpoint' is set if @api_client.config.client_side_validation && service_instance_endpoint.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(service_instance_endpoint) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_service_instance_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInsta...
[ "0.6255446", "0.6160107", "0.59500915", "0.5949246", "0.5872546", "0.58042", "0.5798773", "0.57841635", "0.5781504", "0.5667666", "0.5664266", "0.56641316", "0.55803627", "0.55576456", "0.5546595", "0.5509095", "0.5476701", "0.5467246", "0.5462339", "0.5422024", "0.54111105",...
0.5209804
45
Create Tier1 service instance endpoint Create Tier1 Service instance endpoint.
def patch_tier1_service_instance_endpoint_0(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {}) patch_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInsta...
[ "0.625494", "0.61595315", "0.5949357", "0.59484917", "0.58725363", "0.580553", "0.57975584", "0.57841337", "0.5780229", "0.56689835", "0.56659293", "0.5663308", "0.5579451", "0.55567473", "0.5547634", "0.55096066", "0.5477932", "0.54663014", "0.54636806", "0.5423361", "0.5410...
0.0
-1
Create Tier1 service instance endpoint Create Tier1 Service instance endpoint.
def patch_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0" end # verify the required parameter 'service_instance_endpoint' is set if @api_client.config.client_side_validation && service_instance_endpoint.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.patch_tier1_service_instance_endpoint_0" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(service_instance_endpoint) auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#patch_tier1_service_instance_endpoint_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_tier1_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, service_instance_endpoint, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInsta...
[ "0.6255446", "0.6160107", "0.59500915", "0.5949246", "0.5872546", "0.58042", "0.5798773", "0.57841635", "0.5781504", "0.5667666", "0.5664266", "0.56641316", "0.55803627", "0.55576456", "0.5546595", "0.5509095", "0.5476701", "0.5467246", "0.5462339", "0.5422024", "0.54111105",...
0.5320438
26
Read all service instance objects under a tier1 Read all service instance objects under a tier1
def read_all_policy_service_instances_for_tier1(tier_1_id, locale_service_id, opts = {}) data, _status_code, _headers = read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_instances\n Puppet.debug(\"all_instances - cached instances is: #{cached_instances}\")\n Puppet.debug(\"all_instances - cached instances object id: #{cached_instances.object_id}\")\n # return cache if it has been created, this means that this function will only need\n # to be loaded once, retur...
[ "0.58823484", "0.57199717", "0.5642335", "0.5568558", "0.5564773", "0.55645937", "0.55250674", "0.5434599", "0.54015064", "0.53887016", "0.5376201", "0.5374497", "0.5331375", "0.5279669", "0.5268225", "0.51972884", "0.51906973", "0.5148846", "0.5145432", "0.5131381", "0.51101...
0.59302133
0
Read all service instance objects under a tier1 Read all service instance objects under a tier1
def read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1, must be greater than or equal to 0.' end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PolicyServiceInstanceListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_all_policy_service_instances_for_tier1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1(tier_1_id, locale_service_id, opts = {})\n data, _status_code, _headers = read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts)\n data\n end", "def all_instances\n Puppet.debug(\"all_instances - cached instan...
[ "0.59302133", "0.58823484", "0.5642335", "0.5568558", "0.5564773", "0.55645937", "0.55250674", "0.5434599", "0.54015064", "0.53887016", "0.5376201", "0.5374497", "0.5331375", "0.5279669", "0.5268225", "0.51972884", "0.51906973", "0.5148846", "0.5145432", "0.5131381", "0.51101...
0.57199717
2
Read all service instance objects under a tier1 Read all service instance objects under a tier1
def read_all_policy_service_instances_for_tier1_0(tier_1_id, locale_service_id, opts = {}) data, _status_code, _headers = read_all_policy_service_instances_for_tier1_0_with_http_info(tier_1_id, locale_service_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1(tier_1_id, locale_service_id, opts = {})\n data, _status_code, _headers = read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts)\n data\n end", "def all_instances\n Puppet.debug(\"all_instances - cached instan...
[ "0.59325004", "0.5883228", "0.57210666", "0.556969", "0.5566228", "0.5565332", "0.55268246", "0.54346424", "0.5401697", "0.53916717", "0.5378528", "0.5375811", "0.53308654", "0.52812237", "0.5270646", "0.5199996", "0.51920074", "0.5150534", "0.51471823", "0.51330644", "0.5111...
0.564421
3
Read all service instance objects under a tier1 Read all service instance objects under a tier1
def read_all_policy_service_instances_for_tier1_0_with_http_info(tier_1_id, locale_service_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1_0" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1_0, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_all_policy_service_instances_for_tier1_0, must be greater than or equal to 0.' end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'include_mark_for_delete_objects'] = opts[:'include_mark_for_delete_objects'] if !opts[:'include_mark_for_delete_objects'].nil? query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PolicyServiceInstanceListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_all_policy_service_instances_for_tier1_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_all_policy_service_instances_for_tier1(tier_1_id, locale_service_id, opts = {})\n data, _status_code, _headers = read_all_policy_service_instances_for_tier1_with_http_info(tier_1_id, locale_service_id, opts)\n data\n end", "def all_instances\n Puppet.debug(\"all_instances - cached instan...
[ "0.59302133", "0.58823484", "0.57199717", "0.5642335", "0.5564773", "0.55645937", "0.55250674", "0.5434599", "0.54015064", "0.53887016", "0.5376201", "0.5374497", "0.5331375", "0.5279669", "0.5268225", "0.51972884", "0.51906973", "0.5148846", "0.5145432", "0.5131381", "0.5110...
0.5568558
4
Read Tier1 BYOD service instance Read Tier1 BYOD service instance
def read_tier1_byod_policy_service_instance(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = read_tier1_byod_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service\n @service ||= bus.service('com.dubstepdish.i3dstatus')\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectivityTier1GatewaysTier1GatewaysApi.read_tier1 ...'\n ...
[ "0.5574296", "0.5488678", "0.54819524", "0.54297084", "0.5396788", "0.53639716", "0.535077", "0.530471", "0.52592874", "0.52423716", "0.5169323", "0.5124693", "0.50960845", "0.5072182", "0.5030228", "0.5030228", "0.5030228", "0.5030228", "0.502663", "0.5024412", "0.49934784",...
0.47879317
59
Read Tier1 BYOD service instance Read Tier1 BYOD service instance
def read_tier1_byod_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ByodPolicyServiceInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_byod_policy_service_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service\n @service ||= bus.service('com.dubstepdish.i3dstatus')\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectivityTier1GatewaysTier1GatewaysApi.read_tier1 ...'\n ...
[ "0.5574296", "0.5488678", "0.54819524", "0.54297084", "0.5396788", "0.53639716", "0.535077", "0.530471", "0.52592874", "0.52423716", "0.5169323", "0.5124693", "0.50960845", "0.5072182", "0.5030228", "0.5030228", "0.5030228", "0.5030228", "0.502663", "0.5024412", "0.49934784",...
0.48394275
42
Read Tier1 BYOD service instance Read Tier1 BYOD service instance
def read_tier1_byod_policy_service_instance_0(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = read_tier1_byod_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service\n @service ||= bus.service('com.dubstepdish.i3dstatus')\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectivityTier1GatewaysTier1GatewaysApi.read_tier1 ...'\n ...
[ "0.557516", "0.5490156", "0.54833305", "0.5430092", "0.5395923", "0.5364202", "0.535165", "0.53031456", "0.5260253", "0.52424943", "0.51703316", "0.51255286", "0.5094189", "0.5069521", "0.50275904", "0.50275904", "0.50275904", "0.50275904", "0.50266063", "0.5024382", "0.49922...
0.48138833
54
Read Tier1 BYOD service instance Read Tier1 BYOD service instance
def read_tier1_byod_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_byod_policy_service_instance_0" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ByodPolicyServiceInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_byod_policy_service_instance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service\n @service ||= bus.service('com.dubstepdish.i3dstatus')\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectivityTier1GatewaysTier1GatewaysApi.read_tier1 ...'\n ...
[ "0.5574296", "0.5488678", "0.54819524", "0.54297084", "0.5396788", "0.53639716", "0.535077", "0.530471", "0.52592874", "0.52423716", "0.5169323", "0.5124693", "0.50960845", "0.5072182", "0.5030228", "0.5030228", "0.5030228", "0.5030228", "0.502663", "0.5024412", "0.49934784",...
0.48848996
30
Read Tier1 service instance Read Tier1 service instance
def read_tier1_policy_service_instance(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = read_tier1_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_tier1(tier_1_id, opts = {})\n data, _status_code, _headers = read_tier1_with_http_info(tier_1_id, opts)\n data\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectiv...
[ "0.59622973", "0.5933636", "0.58663744", "0.5777507", "0.568712", "0.5613026", "0.5460806", "0.5455378", "0.53422296", "0.5321433", "0.52945006", "0.52197695", "0.5170293", "0.51636386", "0.51562506", "0.5117856", "0.5110099", "0.51057935", "0.5105114", "0.510106", "0.5035279...
0.0
-1
Read Tier1 service instance Read Tier1 service instance
def read_tier1_policy_service_instance_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PolicyServiceInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_policy_service_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_tier1(tier_1_id, opts = {})\n data, _status_code, _headers = read_tier1_with_http_info(tier_1_id, opts)\n data\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectiv...
[ "0.59622973", "0.5933636", "0.58663744", "0.5777507", "0.568712", "0.5613026", "0.5460806", "0.5455378", "0.53422296", "0.5321433", "0.52945006", "0.52197695", "0.5170293", "0.51636386", "0.51562506", "0.5117856", "0.5110099", "0.51057935", "0.5105114", "0.510106", "0.5035279...
0.4937659
35
Read Tier1 service instance Read Tier1 service instance
def read_tier1_policy_service_instance_0(tier_1_id, locale_service_id, service_instance_id, opts = {}) data, _status_code, _headers = read_tier1_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_tier1(tier_1_id, opts = {})\n data, _status_code, _headers = read_tier1_with_http_info(tier_1_id, opts)\n data\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectiv...
[ "0.596298", "0.5934883", "0.5867492", "0.57776564", "0.56867754", "0.56125337", "0.54608375", "0.5456013", "0.53423405", "0.53216696", "0.529398", "0.5219874", "0.5168643", "0.51626885", "0.5158154", "0.51167804", "0.5109747", "0.51051366", "0.510492", "0.5103115", "0.5034319...
0.0
-1
Read Tier1 service instance Read Tier1 service instance
def read_tier1_policy_service_instance_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_0" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PolicyServiceInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_policy_service_instance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_tier1(tier_1_id, opts = {})\n data, _status_code, _headers = read_tier1_with_http_info(tier_1_id, opts)\n data\n end", "def read_tier1_with_http_info(tier_1_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingConnectiv...
[ "0.59622973", "0.5933636", "0.58663744", "0.5777507", "0.568712", "0.5613026", "0.5460806", "0.5455378", "0.53422296", "0.5321433", "0.52945006", "0.52197695", "0.5170293", "0.51636386", "0.51562506", "0.5117856", "0.5110099", "0.51057935", "0.5105114", "0.510106", "0.5035279...
0.50291663
22
Read Tier1 service instance endpoint Read Tier1 service instance endpoint
def read_tier1_policy_service_instance_endpoint(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) data, _status_code, _headers = read_tier1_policy_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_endpoint()\n end", "def service_endpoint; end", "def service_endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint\n raise NotImplementedError\n end", "def ipn_endpoint; end", "def ipn_endpoint; end", "def en...
[ "0.64534795", "0.623006", "0.623006", "0.612847", "0.612847", "0.612847", "0.612847", "0.5919416", "0.58240694", "0.58240694", "0.57863206", "0.57863206", "0.5742387", "0.56770355", "0.56624746", "0.5638", "0.56114364", "0.5609996", "0.56054515", "0.55743086", "0.5557844", ...
0.0
-1
Read Tier1 service instance endpoint Read Tier1 service instance endpoint
def read_tier1_policy_service_instance_endpoint_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint" end # resource path local_var_path = '/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ServiceInstanceEndpoint') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_policy_service_instance_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_endpoint()\n end", "def service_endpoint; end", "def service_endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint\n raise NotImplementedError\n end", "def ipn_endpoint; end", "def ipn_endpoint; end", "def en...
[ "0.64534795", "0.623006", "0.623006", "0.612847", "0.612847", "0.612847", "0.612847", "0.5919416", "0.58240694", "0.58240694", "0.57863206", "0.57863206", "0.5742387", "0.56770355", "0.56624746", "0.5638", "0.56114364", "0.5609996", "0.56054515", "0.55743086", "0.5557844", ...
0.5420147
30
Read Tier1 service instance endpoint Read Tier1 service instance endpoint
def read_tier1_policy_service_instance_endpoint_0(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) data, _status_code, _headers = read_tier1_policy_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_endpoint()\n end", "def service_endpoint; end", "def service_endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint\n raise NotImplementedError\n end", "def ipn_endpoint; end", "def ipn_endpoint; end", "def en...
[ "0.6453197", "0.6229735", "0.6229735", "0.6127977", "0.6127977", "0.6127977", "0.6127977", "0.5919018", "0.582366", "0.582366", "0.5786764", "0.5786764", "0.57416564", "0.56767005", "0.56616694", "0.5637726", "0.56110954", "0.5609412", "0.56064254", "0.5574596", "0.5556289", ...
0.0
-1
Read Tier1 service instance endpoint Read Tier1 service instance endpoint
def read_tier1_policy_service_instance_endpoint_0_with_http_info(tier_1_id, locale_service_id, service_instance_id, service_instance_endpoint_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint_0 ...' end # verify the required parameter 'tier_1_id' is set if @api_client.config.client_side_validation && tier_1_id.nil? fail ArgumentError, "Missing the required parameter 'tier_1_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'locale_service_id' is set if @api_client.config.client_side_validation && locale_service_id.nil? fail ArgumentError, "Missing the required parameter 'locale_service_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'service_instance_id' is set if @api_client.config.client_side_validation && service_instance_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint_0" end # verify the required parameter 'service_instance_endpoint_id' is set if @api_client.config.client_side_validation && service_instance_endpoint_id.nil? fail ArgumentError, "Missing the required parameter 'service_instance_endpoint_id' when calling PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi.read_tier1_policy_service_instance_endpoint_0" end # resource path local_var_path = '/global-infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/byod-service-instances/{service-instance-id}/service-instance-endpoints/{service-instance-endpoint-id}'.sub('{' + 'tier-1-id' + '}', tier_1_id.to_s).sub('{' + 'locale-service-id' + '}', locale_service_id.to_s).sub('{' + 'service-instance-id' + '}', service_instance_id.to_s).sub('{' + 'service-instance-endpoint-id' + '}', service_instance_endpoint_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BasicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ServiceInstanceEndpoint') if @api_client.config.debugging @api_client.config.logger.debug "API called: PolicySecurityServiceInsertionServiceInstancesTier1GatewaysApi#read_tier1_policy_service_instance_endpoint_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_endpoint()\n end", "def service_endpoint; end", "def service_endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint; end", "def endpoint\n raise NotImplementedError\n end", "def ipn_endpoint; end", "def ipn_endpoint; end", "def en...
[ "0.64534795", "0.623006", "0.623006", "0.612847", "0.612847", "0.612847", "0.612847", "0.5919416", "0.58240694", "0.58240694", "0.57863206", "0.57863206", "0.5742387", "0.56770355", "0.56624746", "0.5638", "0.56114364", "0.5609996", "0.56054515", "0.55743086", "0.5557844", ...
0.54759836
25
CSV's delegated and overwritten IO methods move the pointer within the file, but FastCSV doesn't notice, so we need to recreate the fiber. The old fiber is garbage collected.
def pos=(*args) super @parser = nil @fiber = nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def touch_csv(csv_file_or_object, fields, field_generators = {})\n Slacker.touch_csv(csv_file_or_object, fields, field_generators)\n end", "def fix_csv(old_csv)\n\t\told_csv.pop\n\t\tproper_headers(old_csv)\n\t\tCSV.open(\"public/ephemeral.csv\", 'wb') do |write_crude|\n\t\t\told_csv.each do |fix_csv|\n\...
[ "0.62514263", "0.595696", "0.59525615", "0.5834525", "0.57536733", "0.57121974", "0.56688195", "0.5663128", "0.56610054", "0.563775", "0.560497", "0.5586076", "0.5565136", "0.5549006", "0.55057526", "0.5481447", "0.5468956", "0.54536104", "0.5451894", "0.5418598", "0.53747916...
0.0
-1
Complete each step below according to the challenge directions and include it in this file. Also make sure everything that isn't code is commented in the file. I worked on this challenge [by myself]. 1. Pseudocode What is the input? the input is an array What is the output? (i.e. What should the code return?) the output is the sum of the array for the first method, and a sentence with all strings in the array for the second method What are the steps needed to solve the problem? Create one method that calculates the sum of an array and one method that creates a sentence from an array. The sum method should use a single block to calculate The sentence method will loop through each word in the array and add it onto the sentence. 2. Initial Solution total method
def total(array) return array.inject { |sum, x| sum + x } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sentence_maker(array)\n\tx = 0\n\tsum = \"\"\n\twhile x <= array.length-1\n\t\tif x == array.length-1\n\t\t\tsum += array[x].to_s\n\t\t\tx += 1\n\t\telse \n\t\t\tsum += array[x].to_s + \" \"\n\t\t\tx += 1\n\t\tend\t\n\tend\n\tsum += \".\"\n\tsum.capitalize!\n\treturn sum\nend", "def sentence_maker(array)\n\t...
[ "0.69088745", "0.681671", "0.67966765", "0.6706811", "0.64498925", "0.63029605", "0.6268446", "0.6233388", "0.6157397", "0.6124314", "0.60926396", "0.6061697", "0.6041328", "0.6041328", "0.6041328", "0.60397243", "0.6037254", "0.6017559", "0.59919035", "0.59793645", "0.596628...
0.55993026
49
3. Refactored Solution Remove return from total function because there is an implicit return
def total(array) array.inject { |sum, x| sum + x } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total; end", "def sum; end", "def total(a,b)\r\n return (a+b)\r\nend", "def calculated; end", "def total(numbers)\n return numbers.reduce(:+)\nend", "def total(arr)\n return arr.inject(:+)\nend", "def computeTotal\n # get rule for total\n rule = @rules.find{ |obj| obj.getCode == \"to...
[ "0.6999281", "0.69650257", "0.67575943", "0.66929144", "0.66499627", "0.6612894", "0.65856373", "0.6556074", "0.6511263", "0.64897454", "0.6473037", "0.6444055", "0.64407015", "0.6433366", "0.64193606", "0.6417248", "0.64165866", "0.6404734", "0.6402996", "0.6394606", "0.6388...
0.0
-1
Remove creation of sentence variable, since it does not exist prior to the loop it is assumed to be blank
def sentence_maker(array) i = 0 while i < array.length do if i == 0 sentence = (array[i].capitalize.to_s + " ") elsif i == array.length-1 sentence = sentence + (array[i].to_s + ".") else sentence = sentence + (array[i].to_s + " ") end i += 1 end return sentence end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def\n \nend\n\n\n# 6. sentence_maker refactored solution", "def reset!\n @sentence = Mikrotik::Protocol::Sentence.new\n end", "def wookie_sentence; end", "def generate_sentence\n current_words = Array.new(depth)\n sentence_array = []\n loop do\n new_word = current_words.last\n sentenc...
[ "0.6751817", "0.6651616", "0.6352127", "0.6345335", "0.63288665", "0.62715745", "0.62142617", "0.61426395", "0.6118643", "0.6108057", "0.60680073", "0.6039611", "0.6026779", "0.6010147", "0.6002192", "0.60004956", "0.5993768", "0.5974419", "0.596539", "0.5942208", "0.59317195...
0.5687697
51
Returns a one byte value as a packed string.
def to_s [(self.v || self.d)].pack("C") end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_s\n value.unpack('B*').first[0...size]\n end", "def value_to_binary_string(value)\n #value.pack(\"V\")\n raise NotImplementedError\n end", "def encode\n s = \"#{@value}\\000\"\n\n n = 0\n @lengths.each do |l|\n s << [@types[n]].pack(\"#{punpack_string(l)}\")\n ...
[ "0.788072", "0.72878927", "0.72875935", "0.7246204", "0.7229513", "0.71769094", "0.7174202", "0.7141749", "0.71250767", "0.7069094", "0.705853", "0.705853", "0.705853", "0.70225877", "0.700097", "0.69838923", "0.6894329", "0.6888931", "0.6791609", "0.67694163", "0.6692308", ...
0.6798357
18
GET /resellers GET /resellers.json
def index @resellers = Reseller.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buyers\n result = get_buyers(params, false)\n render json: result, status: 200\n end", "def index\n @sellers = Seller.all\n end", "def getReseller( reseller_id)\n params = Hash.new\n params['reseller_id'] = reseller_id\n return doCurl(\"get\",\"/reseller\",params)\n end", "def index\...
[ "0.7240156", "0.693139", "0.6767027", "0.6755283", "0.6718882", "0.6706292", "0.6425745", "0.6425132", "0.64033175", "0.63651097", "0.63413423", "0.62723064", "0.62723064", "0.62723064", "0.6246976", "0.61726844", "0.6145422", "0.61003244", "0.6087911", "0.6042917", "0.603694...
0.75359005
0
GET /resellers/1 GET /resellers/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @resellers = Reseller.all\n end", "def getReseller( reseller_id)\n params = Hash.new\n params['reseller_id'] = reseller_id\n return doCurl(\"get\",\"/reseller\",params)\n end", "def buyers\n result = get_buyers(params, false)\n render json: result, status: 200\n end", "def in...
[ "0.7352159", "0.7007593", "0.69116247", "0.6756099", "0.67179024", "0.6687764", "0.66867924", "0.6662058", "0.66377115", "0.6596913", "0.6419346", "0.6419346", "0.6419346", "0.63198936", "0.63085866", "0.62620544", "0.6254243", "0.6248468", "0.62175024", "0.61864823", "0.6166...
0.0
-1
POST /resellers POST /resellers.json
def create @reseller = Reseller.new(reseller_params) respond_to do |format| if @reseller.save ResellerMailer.welcome_email(@reseller).deliver_now ResellerMailer.new_signup_email(@reseller).deliver_now format.html { redirect_to thankyou_path from: 'reseller' } format.json { render :show, status: :created, location: @reseller } else format.html { render :new } format.json { render json: @reseller.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @renter = Renter.new(params[:renter])\n @locals = User.where(:city => @buyer.city)\n @users = @locals.random(5)\n respond_to do |format|\n if @renter.save\n @users.each do |user|\n RenterMailer.registration_welcome(@renter, user).deliver\n Renter.increment_cou...
[ "0.6455213", "0.6209023", "0.6006824", "0.5946656", "0.5892001", "0.5891423", "0.5878485", "0.57961905", "0.57387125", "0.572601", "0.5682215", "0.5666363", "0.56537455", "0.56280494", "0.56242776", "0.5612147", "0.55921185", "0.55866134", "0.55798835", "0.55791634", "0.55781...
0.6155387
2
PATCH/PUT /resellers/1 PATCH/PUT /resellers/1.json
def update respond_to do |format| if @reseller.update(reseller_params) format.html { redirect_to @reseller, notice: 'Reseller was successfully updated.' } format.json { render :show, status: :ok, location: @reseller } else format.html { render :edit } format.json { render json: @reseller.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @supermarket = Supermarket.find(params[:id]) \n respond_to do |format|\n if @supermarket.update(supermarket_params)\n format.json { render json: @supermarket, status: :ok }\n end\n end\n end", "def update\n @seller = Seller.find(params[:id])\n\n respond_to do |forma...
[ "0.655781", "0.6412277", "0.63853073", "0.62947094", "0.62558496", "0.6226081", "0.6163599", "0.61619866", "0.6155889", "0.61457425", "0.6129929", "0.6124761", "0.61039466", "0.6093266", "0.6077119", "0.6025289", "0.6024947", "0.6024939", "0.60176075", "0.60072273", "0.600722...
0.67319256
0
DELETE /resellers/1 DELETE /resellers/1.json
def destroy @reseller.destroy respond_to do |format| format.html { redirect_to resellers_url, notice: 'Reseller was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @seller = Seller.find(params[:id])\n @seller.destroy\n\n respond_to do |format|\n format.html { redirect_to sellers_url }\n format.json { head :ok }\n end\n end", "def destroy\n @seller = Seller.find(params[:id])\n @seller.destroy\n\n respond_to do |format|\n fo...
[ "0.6895292", "0.68911314", "0.68911314", "0.6841968", "0.6770736", "0.6737219", "0.66752434", "0.6668417", "0.6662913", "0.6611177", "0.66106975", "0.6601415", "0.65979344", "0.6587867", "0.65875924", "0.65875924", "0.65874404", "0.6568915", "0.6561583", "0.6524002", "0.65169...
0.7228871
0
Use callbacks to share common setup or constraints between actions.
def set_reseller @reseller = Reseller.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163443", "0.604317", "0.5943409", "0.59143174", "0.5887026", "0.58335453", "0.57738566", "0.5701527", "0.5701527", "0.56534666", "0.5618685", "0.54237175", "0.5407991", "0.5407991", "0.5407991", "0.5394463", "0.5376582", "0.5355932", "0.53376216", "0.5337122", "0.5329516"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def reseller_params params.require(:reseller).permit(:provider_id, :first_name, :last_name, :email, :phone, :best_time, :best_way, :business_name, :business_phone, :street_address_1, :street_address_2, :city, :state, :zip, :interested, :number_computers, :want_internet, :want_television, :want_phone, :number_televisions, :number_phones, :other_provider, :referrer_id, :other_referrer ) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
___________________________________________________ Find all the restaurants that have the word "Austin" in it (caseinsensitive).
def restaurants_with_austin ratings.select do |r| if r["venue"].downcase.include? "austin" puts "#{r["venue"]}" end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @restaurants = if params[:search]\n Restaurant.where('name ILIKE ?', \"%#{params[:search]}%\")\n else\n @restaurants = Restaurant.all\n end\n\n end", "def find\n\t\tputs \"Enter keyword, EX: Mexican or Mex\"\n\t\tuserKeyword = gets.chomp.downcase.strip\n\t\trestaurants = Restauran...
[ "0.6564779", "0.651378", "0.6485626", "0.6259089", "0.6254611", "0.62230504", "0.6203366", "0.61308646", "0.61245126", "0.61241776", "0.60357976", "0.60246795", "0.59598714", "0.5954278", "0.59240896", "0.59053296", "0.5895082", "0.58841884", "0.5857187", "0.5847564", "0.5832...
0.71452916
0
___________________________________________________ Find the top 3 movie genres with the most ratings.
def movie_data response = RestClient.get("critics.api.mks.io/movie-genres") JSON.parse(response) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def top_three_recipes\n recipe_cards.max_by(3) {|recipe_cards| recipe_cards.rating}\n end", "def top_three_recipes\n\t\trecipes.select { |recipe| recipe.rating }.sort_by { |recipe| recipe.rating }.last(3)\n\tend", "def top_three_recipes\n recipes_sorted_by_rating.reverse[0..2]\n end", "def top_thre...
[ "0.7643522", "0.74959177", "0.72983307", "0.7244247", "0.72330576", "0.7233017", "0.7198264", "0.70142", "0.69856566", "0.6966169", "0.6727835", "0.6679263", "0.6637253", "0.65064687", "0.6476164", "0.6474964", "0.6453817", "0.645235", "0.64509267", "0.64451855", "0.64397365"...
0.0
-1
def after_sign_in_path_for(resource) root_url(:subdomain => current_user.username) sign_in(current_user) end
def theme_name if params[:action] == "home" @theme_name = ThemeOption.where(user_id: current_user.id).first.template.downcase else "application" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def after_sign_in_path_for(resource)\n if resource.class == 'Group'\n # root_url(:subdomain => current_user.subdomain)\n root_url\n else\n root_url\n end\n end", "def after_sign_in_path_for(_resource)\n root_url\n end", "def after_sign_in_path_for(user)\n app_url(subdomain: curr...
[ "0.88923585", "0.88681173", "0.8711681", "0.8688577", "0.8663956", "0.8646047", "0.8646047", "0.8646047", "0.8646047", "0.85914606", "0.85708886", "0.8560032", "0.85392797", "0.8530426", "0.85133135", "0.8473088", "0.847228", "0.845709", "0.8456469", "0.83489984", "0.83483994...
0.0
-1
Generate a contact URL
def to_url scheme = case phone_number_type when 'phone' then 'tel' when 'mobile' then 'tel' when 'fax' then 'fax' when 'email' then 'mailto' end return unless scheme "#{scheme}:#{number}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def url() \n\t #'http://' << ENV['DOMAIN'] << \n\t '/' << self.author.username.to_s << '/' << self.name.to_s\n end", "def account_with_url_for(contact)\n contact.account ? link_to(h(contact.account.name), account_path(contact.account)) : \"\"\n end", "def _url\n URI.join(domain, path_gen.for_uri)...
[ "0.67568463", "0.64634526", "0.64476496", "0.6391681", "0.63866526", "0.63783854", "0.62463033", "0.62447625", "0.6205008", "0.61767936", "0.61588985", "0.6157849", "0.6157501", "0.6153585", "0.61139053", "0.61139053", "0.6104737", "0.60916466", "0.60846806", "0.6042832", "0....
0.7144989
0
PATCH/PUT /makrana_marbles/1 PATCH/PUT /makrana_marbles/1.json
def update respond_to do |format| if @makrana_marble.update(makrana_marble_params) format.html { redirect_to @makrana_marble, notice: 'Marble product was successfully updated.' } format.json { head :no_content } else format.html { render action: 'edit' } format.json { render json: @makrana_marble.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @kishangarh_marble.update(kishangarh_marble_params)\n format.html { redirect_to @kishangarh_marble, notice: 'Kishangarh marble was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n ...
[ "0.68325347", "0.67135483", "0.6319726", "0.6281906", "0.6270078", "0.6261033", "0.6241598", "0.62310785", "0.61893684", "0.61508656", "0.61154914", "0.6107125", "0.6099364", "0.60980546", "0.6081795", "0.6070554", "0.6070099", "0.6065881", "0.60485613", "0.60464025", "0.6038...
0.71258426
0
DELETE /makrana_marbles/1 DELETE /makrana_marbles/1.json
def destroy @makrana_marble.destroy respond_to do |format| format.html { redirect_to makrana_marbles_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @kishangarh_marble.destroy\n respond_to do |format|\n format.html { redirect_to kishangarh_marbles_url }\n format.json { head :no_content }\n end\n end", "def delete\n client.delete(\"/#{id}\")\n end", "def delete_json(path)\n url = [base_url, path].join\n resp =...
[ "0.72362965", "0.7136852", "0.6954969", "0.6891273", "0.67966425", "0.6787778", "0.67567784", "0.67492473", "0.67388994", "0.67384666", "0.67368287", "0.66873384", "0.66721946", "0.6668189", "0.6651261", "0.66480166", "0.66339207", "0.6626199", "0.66252387", "0.66237104", "0....
0.74664295
0
Use callbacks to share common setup or constraints between actions.
def set_makrana_marble @makrana_marble = MakranaMarble.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163443", "0.604317", "0.5943409", "0.59143174", "0.5887026", "0.58335453", "0.57738566", "0.5701527", "0.5701527", "0.56534666", "0.5618685", "0.54237175", "0.5407991", "0.5407991", "0.5407991", "0.5394463", "0.5376582", "0.5355932", "0.53376216", "0.5337122", "0.5329516"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def makrana_marble_params params.require(:makrana_marble).permit(:name, :price,:makrana_marble_pics,:category,:zoom_image) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
add custom methods below
def show file_name = CamaleonCms::Post.find(params[:id]).decorate.the_field('downloads_file') f_path = CamaleonCmsLocalUploader::private_file_path(file_name, current_site) if File.exist?(f_path) Download.create({ user_id: current_user.id, post_id: params[:id], metadata: { ip: request.ip, user_agent: request.user_agent, file_name: file_name } }) send_file f_path, disposition: 'inline' else raise ActionController::RoutingError, 'File not found' end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def methods() end", "def custom; end", "def custom; end", "def methods; end", "def methods; end", "def methods; end", "def methods; end", "def methods\n super + DELEGATED_METHODS\n end", "def method; end", "def method; end", "def method; end", "def method; end", "def method; end...
[ "0.7734749", "0.7614756", "0.7614756", "0.74777895", "0.74777895", "0.74777895", "0.74777895", "0.6926938", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.6921097", "0.68819135"...
0.0
-1
We only allow the contingency planner to extract the cards that have been used only once. We only want to display the event cards as discarded if they have been discarded and not picked up by the contingency planer. To do that, we find all the cards that have not been discarded more than once (This scenario can happen when the contingency planer played an event card he previously picked up). We then remove the cards that the contingency planer has in his inventory (If the event card is both discarded and in the contingency planer's inventory, it must have been picked up in a previous action).
def call event_staticids.map do |staticid| SpecialCard.find(staticid) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discard(card)\n discard_pile << card\n end", "def remove_card_row_cards\n card_row.each do |gc|\n gc.discard! if gc && gc.position < self.card_row_discard_size\n end\n end", "def available_cards(correct_card_ids)\n # Exclude cards that have already been successfully answered\n ...
[ "0.70546097", "0.68158215", "0.66413677", "0.65970707", "0.6490939", "0.64872676", "0.6465819", "0.64166903", "0.6410046", "0.63794386", "0.6371314", "0.63552016", "0.6347802", "0.6307221", "0.6299493", "0.62940675", "0.623763", "0.6223697", "0.6221691", "0.62139463", "0.6206...
0.0
-1
rubocop:disable LineLength rubocop:disable AbcSize
def write_index html = HtmlHelpers.build do |b| content = b.jumbotron(b.title(@config[:index_title], 'title')) content += b.title(RESOURCES_TEXT) content += b.unordered_list(resources.keys) content += b.link("#{ERROR_CODE_URL}.html", b.subtitle(ERROR_CODE_TEXT)) unless error_codes.empty? container = b.container(b.row(content)) b.html_header(header_title, container, @config[:inline_css]) end write_to_file("#{output_dir}/index.html", html) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def big_bad; end", "def private_method\n end", "def implementation; end", "def implementation; end", "def probers; end", "def my_size\n 1\n end", "def size=(_); end", "def size=(_); end", "def schubert; end", "def size; end", "def size; end", "def size; end"...
[ "0.73306245", "0.5994333", "0.5860821", "0.5855429", "0.5855429", "0.58265376", "0.57856655", "0.5726234", "0.5726234", "0.570183", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.56900364", "0.5...
0.0
-1
Requests a connection object from the connection pool. connection = pool.connection_for('domain.com') connection.request(Net::HTTP::Get.new('/index.html')) connection.request(Net::HTTP::Get.new('/about.html')) same thing in block form pool.connection_for('domain.com') do |connection| connection.request(Net::HTTP::Get.new('/index.html')) connection.request(Net::HTTP::Get.new('/about.html')) end Because the pool manages HTTP sessions you do not have to worry about closing a connection or returning a connection to the pool. Every time you call request on a connection object, a HTTP session received from the pool and returned after the request is complete.
def connection_for host, options = {}, &block connection = Connection.new(self, host, options) yield(connection) if block_given? connection end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request(req = nil, options = {}, &block)\n @pool.with_connection do |connection|\n begin\n connection.request req, options, &block\n rescue Exception => e\n @pool.remove(connection)\n raise\n end\n end\n end", "def conn\n @conn ||= connect\n if block_given...
[ "0.70712215", "0.6865806", "0.6775215", "0.67118084", "0.652175", "0.6521659", "0.6499072", "0.64943236", "0.645212", "0.64445376", "0.6400179", "0.6374956", "0.63282734", "0.62813157", "0.62651896", "0.6226672", "0.6219206", "0.6196349", "0.6162976", "0.61153466", "0.610464"...
0.63074315
13
Returns the number of sessions currently in the pool, not counting those currently in use.
def size @pool_mutex.synchronize { @pool.size } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def session_count\n @http_client.session_count\n end", "def session_count\n @http_client.session_count\n end", "def session_count\n entries.count('attended_session')\n end", "def current_pool_size(pool_name)\n pool(pool_name).count\n end", "def pool \n @pool.select(&:...
[ "0.751882", "0.751882", "0.7052156", "0.6961703", "0.69174224", "0.6824242", "0.67998475", "0.6658201", "0.6530768", "0.65033126", "0.63871723", "0.6382236", "0.6256664", "0.61764187", "0.6172329", "0.6167277", "0.6157506", "0.6156232", "0.6116119", "0.610121", "0.6035581", ...
0.6383814
11
Removes stale http sessions from the pool (that have exceeded the idle timeout).
def clean! @pool_mutex.synchronize { _clean } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reap_expired_sessions\n @timestamps.each do |session_id,stamp|\n delete_session(session_id) if (stamp + @session_ttl) < Time.now \n end\n GC.start\n end", "def cleanup\n @sessions.each_value do |session|\n session.close if session.expired?\n end\n ...
[ "0.6963261", "0.6915655", "0.690415", "0.63019747", "0.63019747", "0.6284289", "0.62255615", "0.62031925", "0.6200842", "0.61912626", "0.6179047", "0.6148755", "0.6125538", "0.6125538", "0.6120973", "0.6056583", "0.6046601", "0.60017264", "0.5986309", "0.5986309", "0.5971708"...
0.528617
86
Closes and removes removes all sessions from the pool. If empty! is called while there are outstanding requests they may get checked back into the pool, leaving the pool in a nonempty state.
def empty! @pool_mutex.synchronize do @pool.each(&:finish) @pool = [] end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup_sessions\n @mutex.synchronize { @sessions.garbage_collect }\n end", "def clear_session\n Mack::SessionStore.expire_all\n end", "def clear_sessions \n sessions.each do |key, session|\n logger.info \"Closing: #{key}\"\n session.close\n end \n ...
[ "0.7035583", "0.66259634", "0.6596378", "0.6568518", "0.65473664", "0.6536656", "0.6520357", "0.6503517", "0.64680356", "0.6449909", "0.64278233", "0.62706995", "0.62659276", "0.6264156", "0.6254002", "0.6252899", "0.62417734", "0.62311023", "0.6224066", "0.62177527", "0.6121...
0.69292384
1
Write a method named include? that takes an Array and a search value as arguments. This method should return true if the search value is in the array, false if it is not. You may not use the Arrayinclude? method in your solution.
def include?(arr, search) arr.each do |element| if element == search return true end end false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def include?(array, search)\n array.each do |value|\n return true if value == search\n end\n false\nend", "def include?(arr, search)\n arr.any? { |i| i == search }\nend", "def include?(array, search_value)\n array.any? { |element| element == search_value }\nend", "def include?(arr, search)\n arr.any...
[ "0.87318766", "0.8564619", "0.85589343", "0.85322535", "0.85317034", "0.839832", "0.8393822", "0.83696365", "0.83552134", "0.83169943", "0.8304971", "0.8293071", "0.8165603", "0.8138183", "0.81308603", "0.81212085", "0.8113191", "0.8107507", "0.8079256", "0.80765855", "0.8045...
0.84378207
5
Write a method that computes the difference between the square of the sum of the first n positive integers and the sum of the squares of the first n positive integers. Examples:
def sum_square_difference(n) square_of_sums = (1..n).inject(:+) ** 2 sum_of_squares = (1..n).inject {|sum, num| sum + (num ** 2)} square_of_sums - sum_of_squares end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sum_square_difference(n)\n integers = (1..n).to_a\n\n square_of_sum = integers.sum ** 2\n sum_of_squares = integers.map { |n| n ** 2 }.sum\n\n square_of_sum - sum_of_squares\nend", "def sum_square_difference(n)\n ((1..n).reduce(:+)**2) - (1..n).reduce{ |sum, i| sum + i**2 }\nend", "def sum_square_dif...
[ "0.854787", "0.85229677", "0.85021406", "0.85000306", "0.8475286", "0.845751", "0.8387166", "0.8375444", "0.83246243", "0.8274602", "0.82738507", "0.8097872", "0.80208457", "0.7928952", "0.7813768", "0.7797255", "0.7733579", "0.77135974", "0.7709057", "0.76909673", "0.7683417...
0.8401951
6
Create a method that takes two integers as arguments. The first argument is a count, and the second is the first number of a sequence that your method will create. The method should return an Array that contains the same number of elements as the count argument, while the values of each element will be multiples of the starting number. You may assume that the count argument will always have a value of 0 or greater, while the starting number can be any integer value. If the count is 0, an empty list should be returned
def sequence(multiple, starting_num) return [] if multiple == 0 counter = 1 array = [] loop do array << counter * starting_num counter += 1 break if counter > multiple end array end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sequence(count, starting_num)\n result_arr = []\n 1.upto(count) { |num| result_arr << starting_num * num }\n result_arr\nend", "def sequence(count, start_number)\n array = []\n count.times { |i| array << (start_number * (i + 1)) }\n array\nend", "def sequence(count, start)\n final_arr = []\n 1.upto...
[ "0.80142564", "0.78074026", "0.7567709", "0.7562581", "0.7558641", "0.7540436", "0.74942553", "0.74785477", "0.74374723", "0.7418926", "0.73927593", "0.73886436", "0.73679894", "0.7338968", "0.7311367", "0.7276826", "0.7214861", "0.71601534", "0.7099355", "0.7040678", "0.7009...
0.7353234
13
initialize | for default is on ./Movies, just type the filename
def initialize(filename, time, directory="./Movies/%s") @hwnd = API.hwnd(nil) @filename = directory % filename @time = time @_ntime = Time.now @refreshTime = 0 @screen = Sprite.new() @screen.bitmap = Bitmap.new(Graphics.width, Graphics.height) @screen.bitmap.fill_rect(0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0)) @screen.z = 10e3 sleep(1.0) MCI.call("open \""+@filename+"\" alias FILE style 1073741824 parent " + @hwnd.to_s,0,0,0) main end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(path)\n super\n @movies = load_data(path).map { |movie| Movie.create(self, movie) }\n end", "def initialize filename\n\t\t@filename = filename\n\tend", "def initialize(file)\r\n raise IOError, \"Cannot read #{file}\" unless File.readable? file\r\n @file = file\r\n @fi...
[ "0.70945776", "0.6798279", "0.669775", "0.6588018", "0.6544795", "0.653428", "0.64948267", "0.64948267", "0.64948267", "0.6390163", "0.6381442", "0.6381442", "0.6372666", "0.62922084", "0.6155978", "0.61206245", "0.6052851", "0.6049529", "0.6046943", "0.6042897", "0.60284173"...
0.6579407
4
update and run the movie
def update loop do if (Time.now.to_f - @_ntime.to_f) >= @time.to_f Graphics.update terminate break return end Input.update if Input.trigger?(Input::C) && $game_temp.mskip terminate break return end if @refreshTime >= rtime Graphics.update @refreshTime = 0 end @refreshTime += 1 end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update() end", "def update\r\n $scene.update\r\n end", "def update\n\n\n prepare_movie(false)\n\n respond_to do |format|\n if @movie.update(movie_params)\n format.html { redirect_to @movie, notice: 'Movie was successfully updated.' }\n format.json { render :show, status: ...
[ "0.6536469", "0.6531511", "0.6440086", "0.6421167", "0.63263154", "0.631737", "0.6299851", "0.6202555", "0.6194916", "0.61818415", "0.61765695", "0.61118865", "0.6099283", "0.6098503", "0.6098503", "0.6086195", "0.6072781", "0.60568035", "0.605509", "0.6054287", "0.6054043", ...
0.0
-1
Sets the cache adaptor IdentityCache will be using == Parameters +cache_adaptor+ A ActiveSupport::Cache::Store
def cache_backend=(cache_adaptor) cache.memcache = cache_adaptor end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_backend=(cache_adaptor)\n if defined?(@cache)\n cache.cache_backend = cache_adaptor\n else\n @cache = MemoizedCacheProxy.new(cache_adaptor)\n end\n end", "def adapter\n unless @_adapter && @_adapter.valid?\n @_adapter = Cachetastic::Adapters.build(cache_klass...
[ "0.7985402", "0.5877068", "0.5712947", "0.565489", "0.5530371", "0.5415116", "0.5412614", "0.52439725", "0.51875204", "0.5162303", "0.5105361", "0.5105361", "0.50983346", "0.5032008", "0.5017104", "0.5003646", "0.49907756", "0.4945278", "0.49392638", "0.49392638", "0.4909831"...
0.8116999
0
Cache retrieval and miss resolver primitive; given a key it will try to retrieve the associated value from the cache otherwise it will return the value of the execution of the block. == Parameters +key+ A cache key string
def fetch(key, &block) result = cache.read(key) if should_cache? if result.nil? if block_given? ActiveRecord::Base.connection.with_master do result = yield end result = map_cached_nil_for(result) if should_cache? cache.write(key, result) end end logger.debug "[IdentityCache] cache miss for #{key}" else logger.debug "[IdentityCache] cache hit for #{key}" end unmap_cached_nil_for(result) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_cached( key, &block )\n \n # have a look in the cache\n value = fetch( key )\n\n # Cache HIT?\n return value unless value.nil?\n\n # Cache MISS : execute the block\n value = block.call( key )\n\n # Store value in the cache\n return store( key, value )\n end", "def fetch(*key)\n ...
[ "0.76635665", "0.75998867", "0.75475943", "0.74763376", "0.7297723", "0.7232896", "0.72085845", "0.7202707", "0.7192883", "0.7160279", "0.71391076", "0.7123286", "0.7102351", "0.70252365", "0.69601166", "0.6928163", "0.69242096", "0.6866633", "0.6859613", "0.68550414", "0.685...
0.70476294
13
Same as +fetch+, except that it will try a collection of keys, using the multiget operation of the cache adaptor == Parameters +keys+ A collection of key strings
def fetch_multi(*keys, &block) return {} if keys.size == 0 result = {} result = cache.read_multi(*keys) if should_cache? missed_keys = keys - result.select {|key, value| value.present? }.keys if missed_keys.size > 0 if block_given? replacement_results = nil ActiveRecord::Base.connection.with_master do replacement_results = yield missed_keys end missed_keys.zip(replacement_results) do |(key, replacement_result)| if should_cache? replacement_result = map_cached_nil_for(replacement_result ) cache.write(key, replacement_result) logger.debug "[IdentityCache] cache miss for #{key} (multi)" end result[key] = replacement_result end end else result.keys.each do |key| logger.debug "[IdentityCache] cache hit for #{key} (multi)" end end result.keys.each do |key| result[key] = unmap_cached_nil_for(result[key]) end result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_multi(*keys)\n keys.flatten!(1)\n return {} if keys.empty?\n\n result = if should_use_cache?\n fetch_in_batches(keys.uniq) do |missed_keys|\n results = yield missed_keys\n results.map { |e| map_cached_nil_for(e) }\n end\n else\n results = yield k...
[ "0.76002806", "0.7560183", "0.7371465", "0.72819227", "0.7221198", "0.7219979", "0.7171256", "0.71348906", "0.71203774", "0.7083447", "0.7018356", "0.6982066", "0.69421977", "0.6888042", "0.67754287", "0.6617798", "0.6563602", "0.64887345", "0.648532", "0.64705306", "0.645360...
0.76531976
0
Will cache an association to the class including IdentityCache. The embed option, if set, will make IdentityCache keep the association values in the same cache entry as the parent. Embedded associations are more effective in offloading database work, however they will increase the size of the cache entries and make the whole entry expire when any of the embedded members change. == Example: class Product cached_has_many :options, :embed => false cached_has_many :orders cached_has_many :buyers, :inverse_name => 'line_item' end == Parameters +association+ Name of the association being cached as a symbol == Options embed: If set will cause IdentityCache to keep the values for this association in the same cache entry as the parent, instead of its own. inverse_name: The name of the parent in the association if the name is not the lowercase pluralization of the parent object's class
def cache_has_many(association, options = {}) options[:embed] ||= false options[:inverse_name] ||= self.name.underscore.to_sym raise InverseAssociationError unless self.reflect_on_association(association) self.cached_has_manys[association] = options if options[:embed] build_denormalized_association_cache(association, options) else build_normalized_has_many_cache(association, options) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_has_one(association, options = {})\n options[:embed] ||= true\n options[:inverse_name] ||= self.name.underscore.to_sym\n raise InverseAssociationError unless self.reflect_on_association(association)\n self.cached_has_ones[association] = options\n\n build_denormalized_association_...
[ "0.71046513", "0.6648191", "0.59606844", "0.59606844", "0.59606844", "0.55167073", "0.5480567", "0.5457248", "0.5451366", "0.5451366", "0.5412294", "0.54065233", "0.5348217", "0.5344842", "0.53327286", "0.53274757", "0.5314365", "0.52985233", "0.52745104", "0.5255052", "0.525...
0.75957143
0
Will cache an association to the class including IdentityCache. The embed option if set will make IdentityCache keep the association values in the same cache entry as the parent. Embedded associations are more effective in offloading database work, however they will increase the size of the cache entries and make the whole entry expire with the change of any of the embedded members == Example: class Product cached_has_one :store, :embed => false cached_has_one :vendor end == Parameters +association+ Symbol with the name of the association being cached == Options embed: If set will cause IdentityCache to keep the values for this association in the same cache entry as the parent, instead of its own. inverse_name: The name of the parent in the association ( only necessary if the name is not the lowercase pluralization of the parent object's class)
def cache_has_one(association, options = {}) options[:embed] ||= true options[:inverse_name] ||= self.name.underscore.to_sym raise InverseAssociationError unless self.reflect_on_association(association) self.cached_has_ones[association] = options build_denormalized_association_cache(association, options) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_has_many(association, options = {})\n options[:embed] ||= false\n options[:inverse_name] ||= self.name.underscore.to_sym\n raise InverseAssociationError unless self.reflect_on_association(association)\n self.cached_has_manys[association] = options\n\n if options[:embed]\n ...
[ "0.7499939", "0.7109111", "0.6008026", "0.6008026", "0.6008026", "0.56056744", "0.55715984", "0.55715984", "0.55703366", "0.5540463", "0.55291826", "0.55284053", "0.55261415", "0.5523675", "0.54644144", "0.5436557", "0.5364033", "0.5353333", "0.53311867", "0.5272194", "0.5271...
0.75980335
0
Will cache a single attribute on its own blob, it will add a fetch_attribute_by_id (or the value of the by option). == Example: class Product cache_attribute :quantity, :by => :name cache_attribute :quantity :by => [:name, :vendor] end == Parameters +attribute+ Symbol with the name of the attribute being cached == Options by: Other attribute or attributes in the model to keep values indexed. Default is :id
def cache_attribute(attribute, options = {}) options[:by] ||= :id fields = Array(options[:by]) self.cache_attributes.push [attribute, fields] field_list = fields.join("_and_") arg_list = (0...fields.size).collect { |i| "arg#{i}" }.join(',') where_list = fields.each_with_index.collect { |f, i| "#{f} = \#{quote_value(arg#{i})}" }.join(" AND ") self.instance_eval(ruby = <<-CODE, __FILE__, __LINE__) def fetch_#{attribute}_by_#{field_list}(#{arg_list}) sql = "SELECT #{attribute} FROM #{table_name} WHERE #{where_list} LIMIT 1" attribute_dynamic_fetcher(#{attribute.inspect}, #{fields.inspect}, [#{arg_list}], sql) end CODE end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_attribute(attribute, by: :id, unique: true)\n cache_attribute_by_alias(attribute, alias_name: attribute, by: by, unique: unique)\n end", "def define_cache(attribute: to_sym)\n attr = \"config_#{attribute}\"\n\n define_method(attr) do\n if instance_variable_defined?(\"...
[ "0.84327346", "0.62910044", "0.62597424", "0.61294657", "0.61114895", "0.5943057", "0.5901276", "0.5774308", "0.57650864", "0.57271767", "0.56748915", "0.5601818", "0.5591343", "0.5543306", "0.5543306", "0.5540423", "0.553313", "0.5527815", "0.5520861", "0.550085", "0.5493077...
0.83529663
1
Similar to ActiveRecord::Baseexists? will return true if the id can be found in the cache.
def exists_with_identity_cache?(id) !!fetch_by_id(id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exists?(cache_key)\n @pg.exec_prepared(@exists_statement_name, [object_to_cache_key(cache_key)]).ntuples.eql?(1)\n end", "def exists?(id)\n with_redis { |redis| !redis.get(id).nil? }\n end", "def record_cached?(id)\n _record_cache.has_key?(id.to_s)\n end", "def exists?\n mode...
[ "0.78093016", "0.7715993", "0.76719224", "0.7443368", "0.7342068", "0.73328525", "0.73315525", "0.73315525", "0.73269147", "0.73006266", "0.7258012", "0.72226185", "0.7202974", "0.7195096", "0.7189971", "0.71881694", "0.71802914", "0.71756184", "0.7149588", "0.7127933", "0.71...
0.87005544
0
Default fetcher added to the model on inclusion, it behaves like ActiveRecord::Base.find_by_id
def fetch_by_id(id) if IdentityCache.should_cache? require_if_necessary do object = IdentityCache.fetch(rails_cache_key(id)){ resolve_cache_miss(id) } IdentityCache.logger.error "[IDC id mismatch] fetch_by_id_requested=#{id} fetch_by_id_got=#{object.id} for #{object.inspect[(0..100)]} " if object && object.id != id.to_i object end else self.find_by_id(id) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find(id)\n fetch([name, id]) do\n super\n end\n end", "def entity load=true\n @entity ||= (klass.where(id: id).first if load)\n end", "def fetch!(id, options = {}, &block)\n fetch(id, options.merge(save: true), &block)\n end", "def fetch(id)\n fetch_by_id(...
[ "0.64649", "0.63680106", "0.63459015", "0.62639517", "0.62422615", "0.6154044", "0.61412954", "0.6114526", "0.6114275", "0.61102635", "0.61093396", "0.60883635", "0.60883033", "0.60677725", "0.60673743", "0.60673743", "0.60553825", "0.6045216", "0.6038123", "0.5997502", "0.59...
0.6059114
16
Default fetcher added to the model on inclusion, it behaves like ActiveRecord::Base.find, will raise ActiveRecord::RecordNotFound exception if id is not in the cache or the db.
def fetch(id) fetch_by_id(id) or raise(ActiveRecord::RecordNotFound, "Couldn't find #{self.class.name} with ID=#{id}") end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_by_id(id)\n if IdentityCache.should_cache?\n\n require_if_necessary do\n object = IdentityCache.fetch(rails_cache_key(id)){ resolve_cache_miss(id) }\n IdentityCache.logger.error \"[IDC id mismatch] fetch_by_id_requested=#{id} fetch_by_id_got=#{object.id} for #{object.inspect...
[ "0.71081644", "0.674263", "0.63975567", "0.63883823", "0.63550884", "0.6301141", "0.61329335", "0.6119155", "0.6086731", "0.606244", "0.6040327", "0.6013962", "0.6012218", "0.600558", "0.60049", "0.60022813", "0.5975402", "0.59102905", "0.5892608", "0.58867896", "0.588301", ...
0.6475814
2
Default fetcher added to the model on inclusion, if behaves like ActiveRecord::Base.find_all_by_id
def fetch_multi(*ids) options = ids.extract_options! if IdentityCache.should_cache? require_if_necessary do cache_keys = ids.map {|id| rails_cache_key(id) } key_to_id_map = Hash[ cache_keys.zip(ids) ] objects_by_key = IdentityCache.fetch_multi(*key_to_id_map.keys) do |unresolved_keys| ids = unresolved_keys.map {|key| key_to_id_map[key] } records = find_batch(ids, options) records.compact.each(&:populate_association_caches) records end cache_keys.map {|key| objects_by_key[key] }.compact end else find_batch(ids, options) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_locally(id)\n if @all.present?\n @all.find { |model| model.id == id }\n end\n end", "def find(id)\n fetch([name, id]) do\n super\n end\n end", "def fetch_by_id(id)\n ensure_base_model\n raise_if_scoped\n return unless id\n rai...
[ "0.6636847", "0.63990146", "0.61538947", "0.6139675", "0.6130623", "0.61074823", "0.60606587", "0.6046114", "0.603612", "0.60270226", "0.6024857", "0.6024857", "0.6008796", "0.5943897", "0.5918234", "0.58997136", "0.58935404", "0.5869013", "0.584913", "0.58231664", "0.5807071...
0.53172016
70
Returns the original header
def original @original_header end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def header\n return @header\n end", "def header\n @raw.split(\"--\" + boundary)[0]\n end", "def actual_header\n data.lines.first.chomp\n end", "def header\n return @message.header\n end", "def raw_headers; end", "def header; message[:header]; end", "def header\n @result...
[ "0.7968712", "0.7809133", "0.77062523", "0.75467306", "0.7543736", "0.7467537", "0.7466377", "0.742175", "0.74104226", "0.7323021", "0.7302127", "0.7189831", "0.7051793", "0.70136285", "0.6953195", "0.69416666", "0.69414836", "0.69236505", "0.68124217", "0.67947036", "0.67947...
0.9001829
0
Returns true if columns contains no elements.
def empty? @columns.empty? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def empty?\n @data.columns_count <= 0\n end", "def empty?\n @column >= @data.columns_count\n end", "def is_empty?\n\t @grid.all? { |col| col.empty? }\n\tend", "def empty?\n @row >= @data.columns_count || @column >= @data.columns_count\n end", "def empty?\n each_cell do |cell|\...
[ "0.8369676", "0.8223765", "0.80698156", "0.78767043", "0.7800265", "0.7784934", "0.7779861", "0.76950145", "0.76034254", "0.7598829", "0.74384385", "0.7436462", "0.74208856", "0.7376327", "0.7374503", "0.73593754", "0.73593754", "0.73593754", "0.7280911", "0.726635", "0.72210...
0.8625055
0
Returns columns as array.
def columns @columns end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cols_array\n arr = Array.new\n @columns_hash.each{|k,v| arr << k}\n return arr\n end", "def to_a\n columns\n end", "def to_a\n @columns.values.flatten.compact\n end", "def to_ary_cols\n ary = Array.new\n cola = Array.new\n coli = 0\n each_index_by...
[ "0.84597725", "0.8455868", "0.7914774", "0.7817184", "0.7809633", "0.78085303", "0.77703804", "0.7763367", "0.7541441", "0.7389927", "0.7388721", "0.73000866", "0.7250223", "0.72328526", "0.72142786", "0.71903396", "0.7181458", "0.71635777", "0.7161898", "0.71457535", "0.7093...
0.7076838
22
Returns columns as array.
def to_a columns end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cols_array\n arr = Array.new\n @columns_hash.each{|k,v| arr << k}\n return arr\n end", "def to_a\n @columns.values.flatten.compact\n end", "def to_ary_cols\n ary = Array.new\n cola = Array.new\n coli = 0\n each_index_by_cols do |row, col|\n if coli !...
[ "0.84597725", "0.7914774", "0.7817184", "0.7809633", "0.78085303", "0.77703804", "0.7763367", "0.7541441", "0.7389927", "0.7388721", "0.73000866", "0.7250223", "0.72328526", "0.72142786", "0.71903396", "0.7181458", "0.71635777", "0.7161898", "0.71457535", "0.70936245", "0.708...
0.8455868
1
Return the number of header columns
def length columns.length end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def header_cells_count\n header_cells.count\n end", "def header_cols\n @row_dims.count\n end", "def number_of_columns\n headings_with_rows.map { |r| r.number_of_columns }.max || 0\n end", "def header_rows\n @col_dims.count\n end", "def headerRowCount\n ...
[ "0.8598347", "0.8459096", "0.8176802", "0.81348854", "0.8126", "0.77281344", "0.7668723", "0.7613302", "0.75724685", "0.75489396", "0.7471584", "0.73858905", "0.73596627", "0.72440046", "0.71909547", "0.71369565", "0.7115238", "0.70662475", "0.69750696", "0.69543403", "0.6942...
0.67852396
28
Set the header converter
def converter=(object) if object.is_a?(Symbol) @converter = HoneyFormat.converter_registry[object] return end if object.is_a?(Hash) @converter = hash_converter(object) return end @converter = object end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_converted_headers\n header_conversion_chart = @import_rows_to_class.const_get(:RECORD_HEADERS).invert\n @converted_headers = importable_columns.map { |col| header_conversion_chart[col] }\n end", "def header_converters\n @header_converters.map do |converter|\n name = HeaderConve...
[ "0.6733514", "0.6575196", "0.5817223", "0.57947975", "0.57933617", "0.5789348", "0.5728831", "0.5708103", "0.5689177", "0.5657229", "0.56089735", "0.56034636", "0.55983406", "0.5596657", "0.5593422", "0.5582495", "0.5576264", "0.5564965", "0.55510646", "0.55508816", "0.552800...
0.5665112
9
Set the header deduplicator
def deduplicator=(object) if object.is_a?(Symbol) @deduplicator = HoneyFormat.header_deduplicator_registry[object] return end @deduplicator = object end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def header_unset(name)\n header_set name, nil\n end", "def set_header_obfuscator(header_obfuscator)\n connection = @session.connection\n connection.set_header_obfuscator(header_obfuscator) if connection.is_a? Logging::Obfuscation::ObfuscationCapable\n end", "def uniq!( header )\n data.uni...
[ "0.58438814", "0.570026", "0.5621976", "0.5538187", "0.5445554", "0.5424213", "0.5383442", "0.5383442", "0.52315325", "0.51824534", "0.5180779", "0.5180779", "0.51400644", "0.5137547", "0.51194453", "0.5111889", "0.5104723", "0.50836056", "0.50598", "0.5037029", "0.50357723",...
0.7295121
0
Convert the column value
def convert_column(column, index) call_column_builder(@converter, column, index)&.to_sym end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column_value_integer\n column_value.to_i.to_s\n end", "def convert(value) value end", "def type_cast(value)\r\n @column_definition.type_cast(value)\r\n end", "def convert_value(value)\n value\n end", "def cast_data_for_column(data, col)\n if !@columns\n r...
[ "0.7294168", "0.72879297", "0.72515434", "0.7099538", "0.7083919", "0.70775443", "0.6964401", "0.69609904", "0.68678087", "0.6825429", "0.68066067", "0.6774276", "0.67143184", "0.66575456", "0.66575456", "0.6636447", "0.66151816", "0.66100556", "0.6604895", "0.6576841", "0.65...
0.656976
20
Returns the callable object method arity
def callable_arity(callable) # procs and lambdas respond to #arity return callable.arity if callable.respond_to?(:arity) callable.method(:call).arity end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def arity\n method(:call).arity\n end", "def arity_of(callable)\n callable.respond_to?(:arity) ? callable.arity : callable.method(:call).arity\n end", "def arity\n parameters.size\n end", "def arity() end", "def arity() end", "def arity(*) end", "def arity; end", "def arit...
[ "0.84352565", "0.8376057", "0.75807655", "0.7550849", "0.7550849", "0.7388655", "0.73434234", "0.7259076", "0.69007945", "0.69007945", "0.68266517", "0.67134", "0.66885746", "0.66176265", "0.6601301", "0.6600234", "0.64902705", "0.64902705", "0.6454412", "0.6438279", "0.63484...
0.7824977
2
until the levitation force is equal to 10, incrementing the levitation force by 1 each time we puts the phrase.
def using_until levitation_force= 6 until levitation_force == 10 do puts "Wingardium Leviosa" levitation_force += 1 end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def using_while\n\tlevitation_force = 6\n\twhile levitation_force < 10\n puts \"Wingardium Leviosa\"\n levitation_force += 1\n end\nend", "def using_until\n levitation_force = 6\n until levitation_force == 10\n puts \"Wingardium Leviosa\" \n levitation_force+= 1\n end\nend", "def using_until\n lev...
[ "0.66318274", "0.65974796", "0.6496439", "0.63508147", "0.57979727", "0.5726755", "0.57027847", "0.56796926", "0.56059444", "0.5557068", "0.5554313", "0.5539439", "0.54821247", "0.5457884", "0.545565", "0.545565", "0.5443542", "0.5431245", "0.53776056", "0.53753054", "0.53719...
0.6276529
4
Rewrites feeds to aim at their renamed equivalents
def rewrite_feed(group, id) case group when 'user' then ['profile', id] when 'user_aggr' then ['profile_aggr', id] when 'media_airing' then ['media_releases', id] when 'episode' then ['unit', "Episode-#{id}"] when 'episode_aggr' then ['unit_aggr', "Episode-#{id}"] when 'chapter' then ['unit', "Chapter-#{id}"] when 'chapter_aggr' then ['unit_aggr', "Chapter-#{id}"] when 'post_comments_aggr', 'private_library' then nil else [group, id] end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rewrite\n rewrited_content = parse_for_urls(content)\n parse_for_ids(rewrited_content)\n end", "def generate_rss_feed tweets, old_items\n version = \"2.0\"\n long_url = nil\n\n @logger.info \"Generating RSS feed to #{@rss_outfile}.\"\n\n content = RSS::Maker.make(version) do |m...
[ "0.60642225", "0.5815195", "0.57091093", "0.5630513", "0.5424835", "0.5391509", "0.53438705", "0.52823013", "0.52770996", "0.52759415", "0.52368027", "0.5233641", "0.51931375", "0.51360023", "0.51305586", "0.5120545", "0.5113283", "0.5100719", "0.50862527", "0.5084352", "0.50...
0.5662303
3
Does this authority configuration have term defined?
def supports_term? term_config.present? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def term_required?( term )\n #puts \"=====> GenericWork.term_required? #{term}\"\n return true if [:author_email, :author_first_name, :author_last_name, :author_institution, :title, :creator, :contributor, :description, :publisher, :rights, :identifier, :department, :degree, :license].include? term\n fals...
[ "0.71338826", "0.69512326", "0.6938955", "0.68242306", "0.65766585", "0.655206", "0.6327525", "0.62968785", "0.62422967", "0.6239428", "0.62140924", "0.6170013", "0.61289275", "0.6117691", "0.60525143", "0.604674", "0.6044572", "0.600686", "0.59570533", "0.5916419", "0.591190...
0.742577
0
Return term url encoding defined in the configuration for this authority.
def term_url Config.config_value(term_config, :url) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encoding\n @attributes[:encoding]\n end", "def encoding\n @external_encoding\n end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", "def encoding; end", ...
[ "0.6375255", "0.6303597", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.6057524", "0.595883", "0.5930487", "0.5901438", "0.5901438", "0...
0.6081776
2
Return term url template defined in the configuration for this authority.
def term_url_template Config.config_value(term_url, :template) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def term_url\n Config.config_value(term_config, :url)\n end", "def get_resource_tpl(term)\n list_resource_tpl.to_a.select { |m| m.term == term }.first\n end", "def template\n Pathname.new(@template || OodPortalGenerator.root.join('templates', 'ood-portal.conf.erb'))\n end", ...
[ "0.6998017", "0.63634884", "0.6192363", "0.6179194", "0.61766136", "0.6048937", "0.60303634", "0.5966091", "0.5966091", "0.59564334", "0.59560263", "0.59018266", "0.5830176", "0.5783523", "0.57087463", "0.565974", "0.5658968", "0.5630148", "0.56186986", "0.56004274", "0.55985...
0.86491334
0
Return term url parameter mapping defined in the configuration for this authority.
def term_url_mappings return @term_url_mappings unless @term_url_mappings.nil? mappings = Config.config_value(term_url, :mapping) return {} if mappings.nil? Hash[*mappings.collect { |m| [m[:variable].to_sym, m] }.flatten] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def term_param(name)\n term_params.select {|t| t.name == name}[0]\n end", "def term_params\n if TERM_ADDITIONAL_FIELDS[params[:term]['controlled_vocabulary_string_key']].blank?\n addl_term_params = []\n else\n addl_term_params = TERM_ADDITIONAL_FIELDS[params[:term]['controlled_vocabul...
[ "0.621949", "0.59115183", "0.58987963", "0.5858358", "0.5856254", "0.5856254", "0.5633246", "0.55860895", "0.54817295", "0.5464743", "0.5464743", "0.5449388", "0.5443508", "0.5424088", "0.5381914", "0.5307165", "0.5304823", "0.5242304", "0.5218561", "0.5170587", "0.5099392", ...
0.6767433
0
Is the term_id substitution expected to be a URI?
def term_id_expects_uri? return false if term_config.nil? || !(term_config.key? :term_id) term_config[:term_id] == "URI" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def term_id_expects_id?\n return false if term_config.nil? || !(term_config.key? :term_id)\n term_config[:term_id] == \"ID\"\n end", "def uri?(word)\n return false if config.include_uris\n !(word =~ URI.regexp).nil?\n end", "def term_valid?(term)\n term.is_a?(String)\...
[ "0.6893717", "0.67285734", "0.6393089", "0.6375922", "0.6329138", "0.6263812", "0.62020475", "0.6009201", "0.60051835", "0.59203947", "0.59112513", "0.5784375", "0.57709205", "0.57378757", "0.57201916", "0.57201916", "0.5718945", "0.5714796", "0.5650531", "0.563585", "0.55964...
0.84111893
0
Is the term_id substitution expected to be an ID?
def term_id_expects_id? return false if term_config.nil? || !(term_config.key? :term_id) term_config[:term_id] == "ID" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def terms_id\n parse_terms_id_response(SolrQuery.new.solr_query(q='rdftype_tesim:\"http://www.w3.org/2004/02/skos/core#ConceptScheme\" AND preflabel_tesim:\"places\"'))\n end", "def term_id(category, term, select)\n s = term_str(category, term, select)\n i = $terms.index s\n unless i\n $terms << s\n ...
[ "0.700985", "0.693333", "0.63347673", "0.6329925", "0.61253047", "0.5950052", "0.59488124", "0.5922546", "0.58130115", "0.5794899", "0.57727516", "0.56985354", "0.56934303", "0.5676261", "0.5670401", "0.5670401", "0.565743", "0.5654547", "0.56097806", "0.55670273", "0.553752"...
0.80330396
0