uid stringlengths 24 24 | split stringclasses 1
value | category stringclasses 2
values | content stringlengths 5 482k | signature stringlengths 1 14k | suffix stringlengths 1 482k | prefix stringlengths 9 14k | prefix_token_count int64 3 5.01k | prefix_token_budget int64 64 256 | element_token_count int64 1 292k | signature_token_count int64 1 5.01k | prefix_context_token_count int64 0 255 | repo stringlengths 7 112 | path stringlengths 4 208 | language stringclasses 1
value | name stringlengths 1 218 | qualname stringlengths 1 218 | start_line int64 1 26.7k | end_line int64 1 26.7k | signature_start_line int64 1 26.7k | signature_end_line int64 1 26.7k | source_hash stringlengths 40 40 | source_dataset stringclasses 1
value | source_split stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f0e74bd118aba7b42468abcf | train | function | def _append_propagation_to_route_table_item(context, route_table, gateway_id):
vgws = route_table.setdefault('propagating_gateways', [])
vgws.append(gateway_id)
db_api.update_item(context, route_table)
| def _append_propagation_to_route_table_item(context, route_table, gateway_id):
| vgws = route_table.setdefault('propagating_gateways', [])
vgws.append(gateway_id)
db_api.update_item(context, route_table)
| db_api.update_item(context, subnet)
def _associate_vpc_item(context, vpc, route_table_id):
vpc['route_table_id'] = route_table_id
db_api.update_item(context, vpc)
def _append_propagation_to_route_table_item(context, route_table, gateway_id):
| 64 | 64 | 51 | 18 | 46 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _append_propagation_to_route_table_item | _append_propagation_to_route_table_item | 674 | 677 | 674 | 674 | 5a65c449ff64fc913c1f0921b1dd2ae429d678b3 | bigcode/the-stack | train |
42f963c7120bdbaaf9cb897b | train | function | def _update_subnet_routes(context, cleaner, subnet, route_table):
neutron = clients.neutron(context)
_update_host_routes(context, neutron, cleaner, route_table, [subnet])
vpn_connection_api._update_vpn_routes(context, neutron, cleaner,
route_table, [subnet])
| def _update_subnet_routes(context, cleaner, subnet, route_table):
| neutron = clients.neutron(context)
_update_host_routes(context, neutron, cleaner, route_table, [subnet])
vpn_connection_api._update_vpn_routes(context, neutron, cleaner,
route_table, [subnet])
| update_host_routes(context, neutron, cleaner, route_table, subnets)
if not update_target or update_target == VPN_TARGET:
vpn_connection_api._update_vpn_routes(context, neutron, cleaner,
route_table, subnets)
def _update_subnet_routes(context, cleaner, subnet, ro... | 64 | 64 | 64 | 15 | 49 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _update_subnet_routes | _update_subnet_routes | 562 | 566 | 562 | 562 | 3d45c84efcb3a4a83932e9876addcd0a280683a5 | bigcode/the-stack | train |
8fa97f5b658edd2322e5f10b | train | function | def _format_route_table(context, route_table, is_main=False,
associated_subnet_ids=[],
gateways={},
network_interfaces={},
vpn_connections_by_gateway_id={}):
vpc_id = route_table['vpc_id']
ec2_route_table = {
... | def _format_route_table(context, route_table, is_main=False,
associated_subnet_ids=[],
gateways={},
network_interfaces={},
vpn_connections_by_gateway_id={}):
| vpc_id = route_table['vpc_id']
ec2_route_table = {
'routeTableId': route_table['id'],
'vpcId': vpc_id,
'routeSet': [],
'propagatingVgwSet': [
{'gatewayId': vgw_id}
for vgw_id in route_table.get('propagating_gateways', [])],
# NOTE(ft): AWS returns ... | _cidr_block
update_target = _get_route_target(route)
if do_replace:
idempotent_call = False
old_target = _get_route_target(old_route)
if old_target != update_target:
update_target = None
else:
old_route = next((r for r in route_table['routes']
... | 249 | 249 | 831 | 38 | 210 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _format_route_table | _format_route_table | 444 | 536 | 444 | 448 | 3b8c54a4d79957b05373a9e2db2d7d9895a0fad9 | bigcode/the-stack | train |
8ed860e48fabd86649235ded | train | function | def _set_route(context, route_table_id, destination_cidr_block,
gateway_id, instance_id, network_interface_id,
vpc_peering_connection_id, do_replace):
route_table = ec2utils.get_db_item(context, route_table_id)
vpc = db_api.get_item_by_id(context, route_table['vpc_id'])
vpc_ipn... | def _set_route(context, route_table_id, destination_cidr_block,
gateway_id, instance_id, network_interface_id,
vpc_peering_connection_id, do_replace):
| route_table = ec2utils.get_db_item(context, route_table_id)
vpc = db_api.get_item_by_id(context, route_table['vpc_id'])
vpc_ipnet = netaddr.IPNetwork(vpc['cidr_block'])
route_ipnet = netaddr.IPNetwork(destination_cidr_block)
if route_ipnet in vpc_ipnet:
msg = _('Cannot create a more specific... | cidr_block'],
'gateway_id': None}]}
route_table = db_api.add_item(context, 'rtb', route_table)
return route_table
def _delete_route_table(context, route_table_id, vpc=None, cleaner=None):
def get_associated_subnets():
return [s for s in db_api.get_items(context, 'sub... | 256 | 256 | 1,171 | 37 | 219 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _set_route | _set_route | 329 | 441 | 329 | 331 | 25e17459050d341f32f84be2fe5b32feb26598eb | bigcode/the-stack | train |
fd411e522300283500609079 | train | function | def _associate_vpc_item(context, vpc, route_table_id):
vpc['route_table_id'] = route_table_id
db_api.update_item(context, vpc)
| def _associate_vpc_item(context, vpc, route_table_id):
| vpc['route_table_id'] = route_table_id
db_api.update_item(context, vpc)
| subnet['route_table_id'] = route_table_id
db_api.update_item(context, subnet)
def _disassociate_subnet_item(context, subnet):
subnet.pop('route_table_id')
db_api.update_item(context, subnet)
def _associate_vpc_item(context, vpc, route_table_id):
| 64 | 64 | 38 | 15 | 49 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _associate_vpc_item | _associate_vpc_item | 669 | 671 | 669 | 669 | 700d9ab56b64124c040ede408676479ac55fa69b | bigcode/the-stack | train |
6dcacbd83e53811c2b0f5612 | train | function | def _update_routes_in_associated_subnets(context, cleaner, route_table,
default_associations_only=None,
update_target=None):
if default_associations_only:
appropriate_rtb_ids = (None,)
else:
vpc = db_api.get_item_b... | def _update_routes_in_associated_subnets(context, cleaner, route_table,
default_associations_only=None,
update_target=None):
| if default_associations_only:
appropriate_rtb_ids = (None,)
else:
vpc = db_api.get_item_by_id(context, route_table['vpc_id'])
if vpc['route_table_id'] == route_table['id']:
appropriate_rtb_ids = (route_table['id'], None)
else:
appropriate_rtb_ids = (route_... | 'routeTableId': route_table['id'],
'subnetId': subnet_id,
'main': False})
if associations:
ec2_route_table['associationSet'] = associations
return ec2_route_table
def _update_routes_in_associated_subnets(context, cleaner, route_table,
de... | 76 | 76 | 256 | 28 | 47 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _update_routes_in_associated_subnets | _update_routes_in_associated_subnets | 539 | 559 | 539 | 541 | d597e7223fe37f22cc173a1846c8ad3cb160b206 | bigcode/the-stack | train |
c88074efa184c52af8a3ada3 | train | function | def disassociate_route_table(context, association_id):
subnet = db_api.get_item_by_id(
context, ec2utils.change_ec2_id_kind(association_id, 'subnet'))
if not subnet:
vpc = db_api.get_item_by_id(
context, ec2utils.change_ec2_id_kind(association_id, 'vpc'))
if vpc is None:
... | def disassociate_route_table(context, association_id):
| subnet = db_api.get_item_by_id(
context, ec2utils.change_ec2_id_kind(association_id, 'subnet'))
if not subnet:
vpc = db_api.get_item_by_id(
context, ec2utils.change_ec2_id_kind(association_id, 'vpc'))
if vpc is None:
raise exception.InvalidAssociationIDNotFound(id... | with common.OnCrashCleaner() as cleaner:
_associate_subnet_item(context, subnet, route_table['id'])
cleaner.addCleanup(_associate_subnet_item, context, subnet,
rollback_route_table_id)
_update_subnet_routes(context, cleaner, subnet, route_table... | 80 | 80 | 269 | 10 | 70 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | disassociate_route_table | disassociate_route_table | 210 | 234 | 210 | 210 | 1992382df27079486fa6cc50178e8f00ffd00632 | bigcode/the-stack | train |
b4b8ed154d73f9d12c294fc4 | train | class | class Validator(common.Validator):
def igw_or_vgw_id(self, id):
self.ec2_id(id, ['igw', 'vgw'])
| class Validator(common.Validator):
| def igw_or_vgw_id(self, id):
self.ec2_id(id, ['igw', 'vgw'])
| vpn_connection_api
from ec2api import clients
from ec2api.db import api as db_api
from ec2api import exception
from ec2api.i18n import _
HOST_TARGET = 'host'
VPN_TARGET = 'vpn'
"""Route tables related API implementation
"""
class Validator(common.Validator):
| 64 | 64 | 32 | 5 | 59 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | Validator | Validator | 39 | 42 | 39 | 40 | 4afab11094cdf49963933c1c69ee3acd1f60f1ea | bigcode/the-stack | train |
f6d8f5474bf8e84385bfe4af | train | class | class RouteTableDescriber(common.TaggableItemsDescriber,
common.NonOpenstackItemsDescriber):
KIND = 'rtb'
FILTER_MAP = {'association.route-table-association-id': (
['associationSet', 'routeTableAssociationId']),
'association.route-table-id': [... | class RouteTableDescriber(common.TaggableItemsDescriber,
common.NonOpenstackItemsDescriber):
| KIND = 'rtb'
FILTER_MAP = {'association.route-table-association-id': (
['associationSet', 'routeTableAssociationId']),
'association.route-table-id': ['associationSet',
'routeTableId'],
'association.subne... | pc_id'])
main_route_table = db_api.get_item_by_id(context, vpc['route_table_id'])
with common.OnCrashCleaner() as cleaner:
_disassociate_subnet_item(context, subnet)
cleaner.addCleanup(_associate_subnet_item, context, subnet,
rollback_route_table_id)
_update_s... | 169 | 169 | 565 | 21 | 147 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | RouteTableDescriber | RouteTableDescriber | 244 | 295 | 244 | 246 | 0da33b4ae75abe4feab13b13bfea215c8bcb954c | bigcode/the-stack | train |
c08fc6594117c1a600628f19 | train | function | def _get_subnet_host_routes_and_gateway_ip(context, route_table, cidr_block,
destinations=None):
if not destinations:
destinations = _get_active_route_destinations(context, route_table)
gateway_ip = str(netaddr.IPAddress(
netaddr.IPNetwork(cidr_block).f... | def _get_subnet_host_routes_and_gateway_ip(context, route_table, cidr_block,
destinations=None):
| if not destinations:
destinations = _get_active_route_destinations(context, route_table)
gateway_ip = str(netaddr.IPAddress(
netaddr.IPNetwork(cidr_block).first + 1))
def get_nexthop(route):
if 'gateway_id' in route:
gateway_id = route['gateway_id']
if gatewa... | ']: item
for item in db_api.get_items_by_ids(context, dst_ids)
if (item['vpc_id'] == route_table['vpc_id'] and
(ec2utils.get_ec2_id_kind(item['id']) != 'vgw' or
item['id'] in vpn_connections))}
for vpn in six.itervalues(vpn_con... | 132 | 132 | 443 | 23 | 108 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _get_subnet_host_routes_and_gateway_ip | _get_subnet_host_routes_and_gateway_ip | 604 | 649 | 604 | 605 | 43364342cfeac2049ac3082883e159d7ca32eb97 | bigcode/the-stack | train |
44ccd86e0bba526599aca28d | train | function | def disable_vgw_route_propagation(context, route_table_id, gateway_id):
route_table = ec2utils.get_db_item(context, route_table_id)
if gateway_id not in route_table.get('propagating_gateways', []):
return True
vpn_gateway = db_api.get_item_by_id(context, gateway_id)
with common.OnCrashCleaner()... | def disable_vgw_route_propagation(context, route_table_id, gateway_id):
| route_table = ec2utils.get_db_item(context, route_table_id)
if gateway_id not in route_table.get('propagating_gateways', []):
return True
vpn_gateway = db_api.get_item_by_id(context, gateway_id)
with common.OnCrashCleaner() as cleaner:
_remove_propagation_from_route_table_item(context, ... | remove_propagation_from_route_table_item,
context, route_table, vpn_gateway['id'])
_update_routes_in_associated_subnets(context, cleaner, route_table,
update_target=VPN_TARGET)
return True
def disable_vgw_route_propagation(context, rou... | 64 | 64 | 169 | 17 | 46 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | disable_vgw_route_propagation | disable_vgw_route_propagation | 127 | 142 | 127 | 127 | a013084a425366519dd0bb5c4bd7b82c56fef287 | bigcode/the-stack | train |
888c8defb7acdd8c30d83e55 | train | function | def delete_route_table(context, route_table_id):
route_table = ec2utils.get_db_item(context, route_table_id)
vpc = db_api.get_item_by_id(context, route_table['vpc_id'])
_delete_route_table(context, route_table['id'], vpc)
return True
| def delete_route_table(context, route_table_id):
| route_table = ec2utils.get_db_item(context, route_table_id)
vpc = db_api.get_item_by_id(context, route_table['vpc_id'])
_delete_route_table(context, route_table['id'], vpc)
return True
| as cleaner:
_disassociate_subnet_item(context, subnet)
cleaner.addCleanup(_associate_subnet_item, context, subnet,
rollback_route_table_id)
_update_subnet_routes(context, cleaner, subnet, main_route_table)
return True
def delete_route_table(context, route_table_... | 64 | 64 | 64 | 10 | 53 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | delete_route_table | delete_route_table | 237 | 241 | 237 | 237 | 93d8f3738d312ca7a7c7c300daf9353bc29c5fec | bigcode/the-stack | train |
4a8598ad9c6c26a68f9397b1 | train | function | def _update_host_routes(context, neutron, cleaner, route_table, subnets):
destinations = _get_active_route_destinations(context, route_table)
for subnet in subnets:
# TODO(ft): do list subnet w/ filters instead of show one by one
os_subnet = neutron.show_subnet(subnet['os_id'])['subnet']
... | def _update_host_routes(context, neutron, cleaner, route_table, subnets):
| destinations = _get_active_route_destinations(context, route_table)
for subnet in subnets:
# TODO(ft): do list subnet w/ filters instead of show one by one
os_subnet = neutron.show_subnet(subnet['os_id'])['subnet']
host_routes, gateway_ip = _get_subnet_host_routes_and_gateway_ip(
... | = clients.neutron(context)
_update_host_routes(context, neutron, cleaner, route_table, [subnet])
vpn_connection_api._update_vpn_routes(context, neutron, cleaner,
route_table, [subnet])
def _update_host_routes(context, neutron, cleaner, route_table, subnets):
| 64 | 64 | 183 | 17 | 47 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _update_host_routes | _update_host_routes | 569 | 582 | 569 | 569 | 06063b5d74756bdf9b7634cba6684d1f16bea45a | bigcode/the-stack | train |
0e362380c7b9ab00f56c37a8 | train | function | def describe_route_tables(context, route_table_id=None, filter=None):
formatted_route_tables = RouteTableDescriber().describe(
context, ids=route_table_id, filter=filter)
return {'routeTableSet': formatted_route_tables}
| def describe_route_tables(context, route_table_id=None, filter=None):
| formatted_route_tables = RouteTableDescriber().describe(
context, ids=route_table_id, filter=filter)
return {'routeTableSet': formatted_route_tables}
| vpns_by_gateway_id.setdefault(vpn['vpn_gateway_id'], [])
vpns.append(vpn)
self.vpn_connections_by_gateway_id = vpns_by_gateway_id
return super(RouteTableDescriber, self).get_db_items()
def describe_route_tables(context, route_table_id=None, filter=None):
| 64 | 64 | 50 | 14 | 50 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | describe_route_tables | describe_route_tables | 298 | 301 | 298 | 298 | f1a32c7e2fe7ffd739ae416936842ee590c49270 | bigcode/the-stack | train |
2ee0be3c78fcce76050c1e00 | train | function | def _associate_subnet_item(context, subnet, route_table_id):
subnet['route_table_id'] = route_table_id
db_api.update_item(context, subnet)
| def _associate_subnet_item(context, subnet, route_table_id):
| subnet['route_table_id'] = route_table_id
db_api.update_item(context, subnet)
| return host_routes, gateway_ip
def _get_route_target(route):
if ec2utils.get_ec2_id_kind(route.get('gateway_id') or '') == 'vgw':
return VPN_TARGET
else:
return HOST_TARGET
def _associate_subnet_item(context, subnet, route_table_id):
| 64 | 64 | 35 | 14 | 49 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _associate_subnet_item | _associate_subnet_item | 659 | 661 | 659 | 659 | 99b7195e5665c18e1a7fcd443a48bca89ae02d8e | bigcode/the-stack | train |
48b7840b55114562a1db534f | train | function | def create_route_table(context, vpc_id):
vpc = ec2utils.get_db_item(context, vpc_id)
route_table = _create_route_table(context, vpc)
return {'routeTable': _format_route_table(context, route_table,
is_main=False)}
| def create_route_table(context, vpc_id):
| vpc = ec2utils.get_db_item(context, vpc_id)
route_table = _create_route_table(context, vpc)
return {'routeTable': _format_route_table(context, route_table,
is_main=False)}
|
HOST_TARGET = 'host'
VPN_TARGET = 'vpn'
"""Route tables related API implementation
"""
class Validator(common.Validator):
def igw_or_vgw_id(self, id):
self.ec2_id(id, ['igw', 'vgw'])
def create_route_table(context, vpc_id):
| 63 | 64 | 59 | 10 | 53 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | create_route_table | create_route_table | 45 | 49 | 45 | 45 | dc125c19bcee3587bab4786e3703fbb1d0654416 | bigcode/the-stack | train |
b24b9e91b21b40470835783b | train | function | def replace_route_table_association(context, association_id, route_table_id):
route_table = ec2utils.get_db_item(context, route_table_id)
if route_table['vpc_id'] == ec2utils.change_ec2_id_kind(association_id,
'vpc'):
vpc = db_api.get_item_by_i... | def replace_route_table_association(context, association_id, route_table_id):
| route_table = ec2utils.get_db_item(context, route_table_id)
if route_table['vpc_id'] == ec2utils.change_ec2_id_kind(association_id,
'vpc'):
vpc = db_api.get_item_by_id(
context, ec2utils.change_ec2_id_kind(association_id, 'vpc'))
... | with an existing association')
msg = msg % {'rtb_id': route_table_id}
raise exception.ResourceAlreadyAssociated(msg)
with common.OnCrashCleaner() as cleaner:
_associate_subnet_item(context, subnet, route_table['id'])
cleaner.addCleanup(_disassociate_subnet_item, context, subnet)
... | 122 | 123 | 411 | 15 | 107 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | replace_route_table_association | replace_route_table_association | 170 | 207 | 170 | 170 | 0c0ee0d95cd48f15dbc3c11b93da4df8af736068 | bigcode/the-stack | train |
666230fc039eea497f78d27c | train | function | def _get_active_route_destinations(context, route_table):
vpn_connections = {vpn['vpn_gateway_id']: vpn
for vpn in db_api.get_items(context, 'vpn')}
dst_ids = [route[id_key]
for route in route_table['routes']
for id_key in ('gateway_id', 'network_interface_id... | def _get_active_route_destinations(context, route_table):
| vpn_connections = {vpn['vpn_gateway_id']: vpn
for vpn in db_api.get_items(context, 'vpn')}
dst_ids = [route[id_key]
for route in route_table['routes']
for id_key in ('gateway_id', 'network_interface_id')
if route.get(id_key) is not None]
ds... | gateway_ip': gateway_ip}})
cleaner.addCleanup(
neutron.update_subnet, subnet['os_id'],
{'subnet': {'host_routes': os_subnet['host_routes'],
'gateway_ip': os_subnet['gateway_ip']}})
def _get_active_route_destinations(context, route_table):
| 63 | 64 | 213 | 12 | 52 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _get_active_route_destinations | _get_active_route_destinations | 585 | 601 | 585 | 585 | 8331040a5838e8e7e8a5332b0f3a0d473c2023cf | bigcode/the-stack | train |
1a895c5b32bf44e17f56ee52 | train | function | def delete_route(context, route_table_id, destination_cidr_block):
route_table = ec2utils.get_db_item(context, route_table_id)
for route_index, route in enumerate(route_table['routes']):
if route['destination_cidr_block'] != destination_cidr_block:
continue
if route.get('gateway_id',... | def delete_route(context, route_table_id, destination_cidr_block):
| route_table = ec2utils.get_db_item(context, route_table_id)
for route_index, route in enumerate(route_table['routes']):
if route['destination_cidr_block'] != destination_cidr_block:
continue
if route.get('gateway_id', 0) is None:
msg = _('cannot remove local route %(desti... | pc_peering_connection_id, False)
def replace_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
vpc_peering_connection_id=None):
return _set_route(context, route_table_id, destination_cidr_block... | 97 | 97 | 325 | 14 | 83 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | delete_route | delete_route | 70 | 103 | 70 | 70 | ede417609e8f075770ac35e9f35e031c59a39627 | bigcode/the-stack | train |
6ce88a39641cf791974bc4ef | train | function | def replace_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
vpc_peering_connection_id=None):
return _set_route(context, route_table_id, destination_cidr_block,
gateway_id,... | def replace_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
vpc_peering_connection_id=None):
| return _set_route(context, route_table_id, destination_cidr_block,
gateway_id, instance_id, network_interface_id,
vpc_peering_connection_id, True)
| destination_cidr_block,
gateway_id, instance_id, network_interface_id,
vpc_peering_connection_id, False)
def replace_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
... | 64 | 64 | 75 | 38 | 26 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | replace_route | replace_route | 61 | 67 | 61 | 64 | 1791010dab98443f306603d3a9c936f6b589502e | bigcode/the-stack | train |
a473069657a19e52193fdeb5 | train | function | def create_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
vpc_peering_connection_id=None):
return _set_route(context, route_table_id, destination_cidr_block,
gateway_id, ins... | def create_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
vpc_peering_connection_id=None):
| return _set_route(context, route_table_id, destination_cidr_block,
gateway_id, instance_id, network_interface_id,
vpc_peering_connection_id, False)
| (context, vpc)
return {'routeTable': _format_route_table(context, route_table,
is_main=False)}
def create_route(context, route_table_id, destination_cidr_block,
gateway_id=None, instance_id=None,
network_interface_id=None,
... | 63 | 64 | 75 | 38 | 25 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | create_route | create_route | 52 | 58 | 52 | 55 | 98f117457cb89cf0b11fdb2bbc642647d0b80023 | bigcode/the-stack | train |
65fa3f18be44e6f0037b0974 | train | function | def _delete_route_table(context, route_table_id, vpc=None, cleaner=None):
def get_associated_subnets():
return [s for s in db_api.get_items(context, 'subnet')
if s.get('route_table_id') == route_table_id]
if (vpc and route_table_id == vpc['route_table_id'] or
len(get_associa... | def _delete_route_table(context, route_table_id, vpc=None, cleaner=None):
| def get_associated_subnets():
return [s for s in db_api.get_items(context, 'subnet')
if s.get('route_table_id') == route_table_id]
if (vpc and route_table_id == vpc['route_table_id'] or
len(get_associated_subnets()) > 0):
msg = _("The routeTable '%(rtb_id)s' has depe... | 'routes': [{'destination_cidr_block': vpc['cidr_block'],
'gateway_id': None}]}
route_table = db_api.add_item(context, 'rtb', route_table)
return route_table
def _delete_route_table(context, route_table_id, vpc=None, cleaner=None):
| 64 | 64 | 185 | 18 | 45 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _delete_route_table | _delete_route_table | 312 | 326 | 312 | 312 | 9e89ebbf7a481eb9f28e5616bbaf6c3d476e780d | bigcode/the-stack | train |
d153036a83a634bc83523492 | train | function | def associate_route_table(context, route_table_id, subnet_id):
route_table = ec2utils.get_db_item(context, route_table_id)
subnet = ec2utils.get_db_item(context, subnet_id)
if route_table['vpc_id'] != subnet['vpc_id']:
msg = _('Route table %(rtb_id)s and subnet %(subnet_id)s belong to '
... | def associate_route_table(context, route_table_id, subnet_id):
| route_table = ec2utils.get_db_item(context, route_table_id)
subnet = ec2utils.get_db_item(context, subnet_id)
if route_table['vpc_id'] != subnet['vpc_id']:
msg = _('Route table %(rtb_id)s and subnet %(subnet_id)s belong to '
'different networks')
msg = msg % {'rtb_id': route_... | ation_to_route_table_item,
context, route_table, gateway_id)
if vpn_gateway and vpn_gateway['vpc_id'] == route_table['vpc_id']:
_update_routes_in_associated_subnets(context, cleaner, route_table,
update_target=VPN_TARGET)
... | 75 | 75 | 253 | 13 | 61 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | associate_route_table | associate_route_table | 145 | 167 | 145 | 145 | a50dd2435f04409d465697b0427810763fa1d8ed | bigcode/the-stack | train |
a245b091d6be3cb4187e7bc9 | train | function | def _disassociate_subnet_item(context, subnet):
subnet.pop('route_table_id')
db_api.update_item(context, subnet)
| def _disassociate_subnet_item(context, subnet):
| subnet.pop('route_table_id')
db_api.update_item(context, subnet)
| == 'vgw':
return VPN_TARGET
else:
return HOST_TARGET
def _associate_subnet_item(context, subnet, route_table_id):
subnet['route_table_id'] = route_table_id
db_api.update_item(context, subnet)
def _disassociate_subnet_item(context, subnet):
| 64 | 64 | 28 | 11 | 53 | NeCTAR-RC/ec2-api | ec2api/api/route_table.py | Python | _disassociate_subnet_item | _disassociate_subnet_item | 664 | 666 | 664 | 664 | ce9172f8875f463a629d7f02aa3594b09d2c181a | bigcode/the-stack | train |
20d761a86f3762914603d393 | train | class | class PoliciesApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
... | class PoliciesApi(object):
| """
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_cl... | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.11 Python SDK
Pure Storage FlashBlade REST 1.11 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.11
Contact... | 170 | 256 | 15,311 | 5 | 164 | mabdelhafez/purity_fb_python_client | purity_fb/purity_fb_1dot11/apis/policies_api.py | Python | PoliciesApi | PoliciesApi | 27 | 1,686 | 27 | 27 | f8c10f60834152c2fa2e7493da679c52ab13d8b6 | bigcode/the-stack | train |
741b3bf11f2ec4e1016ad765 | train | class | class AlwaysUseHttpsRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
e... | class AlwaysUseHttpsRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `CiphersResp` object
"""
headers = {}
sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
service_version='V1',
... | 217 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | AlwaysUseHttpsRespResult | AlwaysUseHttpsRespResult | 2,302 | 2,386 | 2,302 | 2,302 | edd69c2c27787fdb80b45a5edee7482159876aa3 | bigcode/the-stack | train |
92eb2642eb5a3e0084c7eef1 | train | class | class ImageLoadOptimizationResp():
"""
Image Load Optimization response.
:attr ImageLoadOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messa... | class ImageLoadOptimizationResp():
| """
Image Load Optimization response.
:attr ImageLoadOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dict... | 227 | 227 | 759 | 6 | 220 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ImageLoadOptimizationResp | ImageLoadOptimizationResp | 6,094 | 6,180 | 6,094 | 6,094 | 2b40b6f24fef0f815a334cb4feab32fa6ca0bb82 | bigcode/the-stack | train |
e1827fca8c1fd9a489d7a9c5 | train | class | class MobileRedirecSettingValue():
"""
Value.
:attr str status: Whether or not the mobile redirection is enabled.
:attr str mobile_subdomain: Which subdomain prefix you wish to redirect visitors
on mobile devices to.
:attr bool strip_uri: Whether to drop the current page path and redirect... | class MobileRedirecSettingValue():
| """
Value.
:attr str status: Whether or not the mobile redirection is enabled.
:attr str mobile_subdomain: Which subdomain prefix you wish to redirect visitors
on mobile devices to.
:attr bool strip_uri: Whether to drop the current page path and redirect to the
mobile subdomain ... | """Return a `str` version of this MinifySettingValue object."""
return json.dumps(self.to_dict(), indent=2)
def __eq__(self, other: 'MinifySettingValue') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
... | 241 | 241 | 805 | 8 | 233 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MobileRedirecSettingValue | MobileRedirecSettingValue | 3,682 | 3,769 | 3,682 | 3,682 | a8d4dea04fca5a663131367c5098c2c4b5f5cef0 | bigcode/the-stack | train |
309d305b5e4d5dd588ba65d8 | train | class | class ImageSizeOptimizationResp():
"""
Image size optimization response.
:attr ImageSizeOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messa... | class ImageSizeOptimizationResp():
| """
Image size optimization response.
:attr ImageSizeOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary repr... | 227 | 227 | 759 | 6 | 220 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ImageSizeOptimizationResp | ImageSizeOptimizationResp | 6,182 | 6,268 | 6,182 | 6,182 | bb3d059aa55276cb93040e1f8e81658f012bf9cc | bigcode/the-stack | train |
f62ce8e0058b7dcd677a12c7 | train | class | class MinifyResp():
"""
Minify response.
:attr MinifyRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init_... | class MinifyResp():
| """
Minify response.
:attr MinifyRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinifyResp | MinifyResp | 6,614 | 6,698 | 6,614 | 6,614 | 525262712637b8946efefa4cfdf58101c27321ec | bigcode/the-stack | train |
91f04c2f28f4852d2cd40365 | train | class | class PseudoIpv4Resp():
"""
Pseudo ipv4 response.
:attr PseudoIpv4RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
... | class PseudoIpv4Resp():
| """
Pseudo ipv4 response.
:attr PseudoIpv4RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | .success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary represent... | 230 | 230 | 768 | 7 | 222 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | PseudoIpv4Resp | PseudoIpv4Resp | 7,049 | 7,133 | 7,049 | 7,049 | 36d648528fbd1d616e45724f61fdcced454b0d71 | bigcode/the-stack | train |
68d440da642791cce04a9ce9 | train | class | class IpGeolocationResp():
"""
IP Geolocation response.
:attr IpGeolocationRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | class IpGeolocationResp():
| """
IP Geolocation response.
:attr IpGeolocationRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(sel... | .success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary represent... | 226 | 226 | 755 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | IpGeolocationResp | IpGeolocationResp | 6,270 | 6,354 | 6,270 | 6,270 | 879659d58db0274e062ad86a82f0d93d5e33363f | bigcode/the-stack | train |
fcd6d6bd0e36dbbc9f019d7d | train | class | class CnameFlatteningResponse():
"""
CNAME Flattening response.
:attr str id: (optional) id.
:attr str value: (optional) value.
:attr datetime modified_on: (optional) Date when it is modified.
:attr bool editable: (optional) editable.
"""
def __init__(self,
*,
... | class CnameFlatteningResponse():
| """
CNAME Flattening response.
:attr str id: (optional) id.
:attr str value: (optional) value.
:attr datetime modified_on: (optional) Date when it is modified.
:attr bool editable: (optional) editable.
"""
def __init__(self,
*,
id: str = None,
... | and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_d... | 214 | 214 | 714 | 7 | 206 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | CnameFlatteningResponse | CnameFlatteningResponse | 5,834 | 5,918 | 5,834 | 5,834 | 1968afbeb73738cadcd19c4de475271af585b0c3 | bigcode/the-stack | train |
5fd596238318e2a4019ae906 | train | class | class ChallengeTtlRespResult():
"""
Container for response information.
:attr str id: ID.
:attr int value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: int,
edi... | class ChallengeTtlRespResult():
| """
Container for response information.
:attr str id: ID.
:attr int value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: int,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ChallengeTtlRespResult | ChallengeTtlRespResult | 2,560 | 2,644 | 2,560 | 2,560 | 9aef2263b2dd7e2cad9581b1c26916b19089b95c | bigcode/the-stack | train |
eda85beefe7a4c98443c79b3 | train | class | class ZonesDnssecResp():
"""
Zones DNS Sec Response.
:attr bool success: Was operation successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
:attr ZonesDnssecRespResult result: Container for response information.
"... | class ZonesDnssecResp():
| """
Zones DNS Sec Response.
:attr bool success: Was operation successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
:attr ZonesDnssecRespResult result: Container for response information.
"""
def __init__(self... | ') and self.messages is not None:
_dict['messages'] = self.messages
if hasattr(self, 'result') and self.result is not None:
_dict['result'] = self.result.to_dict()
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return... | 225 | 225 | 753 | 6 | 218 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ZonesDnssecResp | ZonesDnssecResp | 7,913 | 7,997 | 7,913 | 7,913 | f8000d17d8a50d3b06f16075e0474e3b8be065e2 | bigcode/the-stack | train |
93654b0d82756da09f74d381 | train | class | class MinifySettingValue():
"""
Value.
:attr str css: Automatically minify all CSS for your website.
:attr str html: Automatically minify all HTML for your website.
:attr str js: Automatically minify all JavaScript for your website.
"""
def __init__(self,
css: str,
... | class MinifySettingValue():
| """
Value.
:attr str css: Automatically minify all CSS for your website.
:attr str html: Automatically minify all HTML for your website.
:attr str js: Automatically minify all JavaScript for your website.
"""
def __init__(self,
css: str,
html: str,
... | 'html') and self.html is not None:
_dict['html'] = self.html
if hasattr(self, 'js') and self.js is not None:
_dict['js'] = self.js
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__... | 222 | 222 | 742 | 6 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinifySettingValue | MinifySettingValue | 3,582 | 3,679 | 3,582 | 3,582 | 2c389e5c15dd0e5e3057563cf58541d7d0e65dcb | bigcode/the-stack | train |
4d66399239ace6eb5c7793ca | train | class | class WafRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bo... | class WafRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | '] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str_... | 215 | 215 | 717 | 6 | 208 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | WafRespResult | WafRespResult | 5,092 | 5,176 | 5,092 | 5,092 | 170daa5375d8999115cffaa3f3b4665bd3e766ed | bigcode/the-stack | train |
780a1278f38467b33030ff35 | train | class | class Ipv6RespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: b... | class Ipv6RespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
de... | 217 | 217 | 726 | 7 | 209 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | Ipv6RespResult | Ipv6RespResult | 3,162 | 3,246 | 3,162 | 3,162 | 5002eaa7e4e91c11ff026b2694d56fbdc4655f6b | bigcode/the-stack | train |
7e959cada6e1c717099e7bdc | train | class | class ServerSideExcludeRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class ServerSideExcludeRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | if hasattr(self, 'nosniff') and self.nosniff is not None:
_dict['nosniff'] = self.nosniff
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this Secu... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ServerSideExcludeRespResult | ServerSideExcludeRespResult | 4,834 | 4,918 | 4,834 | 4,834 | 65a4ef7de6eec94915a053ea94cabc48a3178775 | bigcode/the-stack | train |
1a502aa44d987e41db2f6379 | train | class | class PrefetchPreloadRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class PrefetchPreloadRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | able
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str... | 222 | 222 | 741 | 8 | 213 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | PrefetchPreloadRespResult | PrefetchPreloadRespResult | 4,112 | 4,196 | 4,112 | 4,112 | dccfe2559a062b2ce46371eec0acff75131c500f | bigcode/the-stack | train |
f19b278fa1199d7eb7246b6b | train | class | class TlsClientAuthResp():
"""
TLS Client authentication response.
:attr TlsClientAuthRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages r... | class TlsClientAuthResp():
| """
TLS Client authentication response.
:attr TlsClientAuthRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def _... | '] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary ... | 230 | 230 | 767 | 7 | 222 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | TlsClientAuthResp | TlsClientAuthResp | 7,483 | 7,567 | 7,483 | 7,483 | d91997a6de70f39d292c3c9f1ae3e60bb753b17a | bigcode/the-stack | train |
b04e35aa71eb7ec192c5606e | train | class | class ImageLoadOptimizationRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class ImageLoadOptimizationRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ImageLoadOptimizationRespResult | ImageLoadOptimizationRespResult | 2,904 | 2,988 | 2,904 | 2,904 | 2f38e6598ad203d097cfdc2ed1bc8b3c707a5834 | bigcode/the-stack | train |
1b4284e1faf43515599596d8 | train | class | class WebsocketsResp():
"""
Websocket Response.
:attr WebsocketsRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
... | class WebsocketsResp():
| """
Websocket Response.
:attr WebsocketsRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | '] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary ... | 226 | 226 | 754 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | WebsocketsResp | WebsocketsResp | 7,741 | 7,825 | 7,741 | 7,741 | d8e4037e8d82dd9a0b529c7503a058bc095d66ae | bigcode/the-stack | train |
b846d90d4b4a45f3fd1fb9bd | train | class | class SecurityHeaderSettingValue():
"""
Value.
:attr SecurityHeaderSettingValueStrictTransportSecurity
strict_transport_security: Strict transport security.
"""
def __init__(self,
strict_transport_security: 'SecurityHeaderSettingValueStrictTransportSecurity') -> None:
... | class SecurityHeaderSettingValue():
| """
Value.
:attr SecurityHeaderSettingValueStrictTransportSecurity
strict_transport_security: Strict transport security.
"""
def __init__(self,
strict_transport_security: 'SecurityHeaderSettingValueStrictTransportSecurity') -> None:
"""
Initialize a Secur... | of this SecurityHeaderRespResultValueStrictTransportSecurity object."""
return json.dumps(self.to_dict(), indent=2)
def __eq__(self, other: 'SecurityHeaderRespResultValueStrictTransportSecurity') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance... | 140 | 140 | 469 | 6 | 133 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderSettingValue | SecurityHeaderSettingValue | 4,688 | 4,744 | 4,688 | 4,688 | 2a8a2dfd26c9b86f568003286b487692c37a668c | bigcode/the-stack | train |
8b0c25ff9841376b6217b896 | train | class | class ZonesDnssecRespResult():
"""
Container for response information.
:attr str status: (optional) Status.
:attr int flags: (optional) Flags.
:attr str algorithm: (optional) Algorithm.
:attr str key_type: (optional) Key type.
:attr str digest_type: (optional) Digest type.
:attr str dig... | class ZonesDnssecRespResult():
| """
Container for response information.
:attr str status: (optional) Status.
:attr int flags: (optional) Flags.
:attr str algorithm: (optional) Algorithm.
:attr str key_type: (optional) Key type.
:attr str digest_type: (optional) Digest type.
:attr str digest_algorithm: (optional) Diges... | value') and self.value is not None:
_dict['value'] = self.value
if hasattr(self, 'editable') and self.editable is not None:
_dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(se... | 256 | 256 | 1,253 | 7 | 248 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ZonesDnssecRespResult | ZonesDnssecRespResult | 5,264 | 5,399 | 5,264 | 5,264 | ccffcd889e161f01ad2368f8ad4383f406899dd2 | bigcode/the-stack | train |
e980a681bd0a7c1eb0a384d7 | train | class | class Ipv6Resp():
"""
IPv6 Response.
:attr Ipv6RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self... | class Ipv6Resp():
| """
IPv6 Response.
:attr Ipv6RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... |
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this... | 225 | 225 | 750 | 6 | 218 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | Ipv6Resp | Ipv6Resp | 6,356 | 6,440 | 6,356 | 6,356 | d40c3a2de39735c84feb193066f0e2500b80beb3 | bigcode/the-stack | train |
0de30a4166cc351f2271f22c | train | class | class SecurityHeaderRespResultValueStrictTransportSecurity():
"""
Strict transport security.
:attr bool enabled: Whether or not security header is enabled.
:attr int max_age: Max age in seconds.
:attr bool include_subdomains: Include all subdomains.
:attr bool nosniff: Whether or not to include... | class SecurityHeaderRespResultValueStrictTransportSecurity():
| """
Strict transport security.
:attr bool enabled: Whether or not security header is enabled.
:attr int max_age: Max age in seconds.
:attr bool include_subdomains: Include all subdomains.
:attr bool nosniff: Whether or not to include 'X-Content-Type-Options:nosniff'
header.
"""
... | ResultValue object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'strict_transport_security') and self.strict_transport_security is not None:
_dict['st... | 256 | 256 | 869 | 10 | 245 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderRespResultValueStrictTransportSecurity | SecurityHeaderRespResultValueStrictTransportSecurity | 4,600 | 4,686 | 4,600 | 4,600 | b7b917e44c3c7feec3a2028e84b4038691d377d6 | bigcode/the-stack | train |
21553cad2d0b3294251e19e7 | train | class | class MaxUploadResp():
"""
Maximum upload response.
:attr MaxUploadRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
... | class MaxUploadResp():
| """
Maximum upload response.
:attr MaxUploadRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this ... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MaxUploadResp | MaxUploadResp | 6,442 | 6,526 | 6,442 | 6,442 | 5128e2080a01a063bd58da5427dc5c5162ab80bf | bigcode/the-stack | train |
51b7e8e3f659b4f2d97c34c2 | train | class | class MaxUploadRespResult():
"""
Container for response information.
:attr str id: ID.
:attr int value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: int,
editab... | class MaxUploadRespResult():
| """
Container for response information.
:attr str id: ID.
:attr int value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: int,
editable: bool,
mo... | ['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
... | 215 | 215 | 717 | 6 | 208 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MaxUploadRespResult | MaxUploadRespResult | 3,248 | 3,332 | 3,248 | 3,248 | 3c2fb113f09c24588cfd3a1215db5d948b148304 | bigcode/the-stack | train |
7312051a722bd6f97e08cf00 | train | class | class Http2Resp():
"""
HTTP2 Response.
:attr Http2RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(s... | class Http2Resp():
| """
HTTP2 Response.
:attr Http2RespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | Http2Resp | Http2Resp | 6,008 | 6,092 | 6,008 | 6,008 | 54b31077e931f1b4889b174d1aad83f8b82c244c | bigcode/the-stack | train |
8575817a7200c98baac3c4d5 | train | class | class ServerSideExcludeResp():
"""
Response of server side exclude.
:attr ServerSideExcludeRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messa... | class ServerSideExcludeResp():
| """
Response of server side exclude.
:attr ServerSideExcludeRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def ... | success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dict... | 227 | 227 | 758 | 6 | 220 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ServerSideExcludeResp | ServerSideExcludeResp | 7,396 | 7,481 | 7,396 | 7,396 | dff03a9ea9ec0713a2900a6a03a2e09729bf6ea6 | bigcode/the-stack | train |
1d87f164aa41f4e10d4729cc | train | class | class ScriptLoadOptimizationRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class ScriptLoadOptimizationRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | ['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ScriptLoadOptimizationRespResult | ScriptLoadOptimizationRespResult | 4,370 | 4,454 | 4,370 | 4,370 | 523bc14c1af6f0ba549067ed357c1eb2f5fb6520 | bigcode/the-stack | train |
1d3b37faa89b64918347d1df | train | class | class ZonesSettingsV1(BaseService):
"""The Zones Settings V1 service."""
DEFAULT_SERVICE_URL = 'https://api.cis.cloud.ibm.com'
DEFAULT_SERVICE_NAME = 'zones_settings'
@classmethod
def new_instance(cls,
crn: str,
zone_identifier: str,
s... | class ZonesSettingsV1(BaseService):
| """The Zones Settings V1 service."""
DEFAULT_SERVICE_URL = 'https://api.cis.cloud.ibm.com'
DEFAULT_SERVICE_NAME = 'zones_settings'
@classmethod
def new_instance(cls,
crn: str,
zone_identifier: str,
service_name: str = DEFAULT_SERVICE_N... | # coding: utf-8
# (C) Copyright IBM Corp. 2020.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 252 | 256 | 15,448 | 8 | 244 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ZonesSettingsV1 | ZonesSettingsV1 | 37 | 2,294 | 37 | 37 | f0bf132a152a1b2e249c285f634bf03e7f6282e1 | bigcode/the-stack | train |
b013246ae924fbb02c7ca79a | train | class | class TrueClientIpRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
edi... | class TrueClientIpRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
de... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | TrueClientIpRespResult | TrueClientIpRespResult | 5,006 | 5,090 | 5,006 | 5,006 | 0551e20ec92fc23b6f4074ccf8cfd5ec4d20b0b8 | bigcode/the-stack | train |
bf493d86da5cae8074ec4672 | train | class | class MinifyRespResult():
"""
Container for response information.
:attr str id: ID.
:attr MinifyRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: 'MinifyRespRe... | class MinifyRespResult():
| """
Container for response information.
:attr str id: ID.
:attr MinifyRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: 'MinifyRespResultValue',
... | :
_dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return s... | 221 | 221 | 739 | 6 | 214 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinifyRespResult | MinifyRespResult | 3,420 | 3,504 | 3,420 | 3,420 | 5e02d57955374c2ce9b250d5b9fa338aa2172adb | bigcode/the-stack | train |
db027f38f3fa90f8f9a15df1 | train | class | class IpGeolocationRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
ed... | class IpGeolocationRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | ['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | IpGeolocationRespResult | IpGeolocationRespResult | 3,076 | 3,160 | 3,076 | 3,076 | 46cf56350c1a8e30168eb99133f759b1d8487b1b | bigcode/the-stack | train |
3151f80ec90f77a59851ec87 | train | class | class AutomaticHttpsRewritesResp():
"""
automatic https rewrite response.
:attr AutomaticHttpsRewritesRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] mes... | class AutomaticHttpsRewritesResp():
| """
automatic https rewrite response.
:attr AutomaticHttpsRewritesRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | ['success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json di... | 232 | 232 | 775 | 7 | 224 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | AutomaticHttpsRewritesResp | AutomaticHttpsRewritesResp | 5,488 | 5,574 | 5,488 | 5,488 | c179001b0bdeafb0d7fd01c7cd6d1fb4b1e2965d | bigcode/the-stack | train |
70665b168df0332ca88ca2f8 | train | class | class SecurityHeaderResp():
"""
Response of Security Header.
:attr SecurityHeaderRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages return... | class SecurityHeaderResp():
| """
Response of Security Header.
:attr SecurityHeaderRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init_... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 221 | 221 | 739 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderResp | SecurityHeaderResp | 7,310 | 7,394 | 7,310 | 7,310 | e036b54bb085250f771c53fcd8a689f07e4da149 | bigcode/the-stack | train |
7d5eb2c9994929165255eef7 | train | class | class BrowserCheckRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
edi... | class BrowserCheckRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | .editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -... | 215 | 215 | 717 | 6 | 208 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | BrowserCheckRespResult | BrowserCheckRespResult | 2,474 | 2,558 | 2,474 | 2,474 | 2fb54523e7644c4dfd4386c48f400a903a7c60c5 | bigcode/the-stack | train |
6ccf0a4938eb8863946df654 | train | class | class ResponseBufferingRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class ResponseBufferingRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
de... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ResponseBufferingRespResult | ResponseBufferingRespResult | 4,284 | 4,368 | 4,284 | 4,284 | 6058bd8c93f65f957b9f7293dbc544053165cf04 | bigcode/the-stack | train |
af592cc5e6079fa78067c46a | train | class | class AutomaticHttpsRewritesRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class AutomaticHttpsRewritesRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 222 | 222 | 741 | 8 | 213 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | AutomaticHttpsRewritesRespResult | AutomaticHttpsRewritesRespResult | 2,388 | 2,472 | 2,388 | 2,388 | 62fcaf6497847a27d6a421fc692442747814b8a0 | bigcode/the-stack | train |
7903b8659b4d04491f3829d4 | train | class | class SecurityHeaderRespResult():
"""
Container for response information.
:attr str id: ID.
:attr SecurityHeaderRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
valu... | class SecurityHeaderRespResult():
| """
Container for response information.
:attr str id: ID.
:attr SecurityHeaderRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: 'SecurityHeaderRespResultValue'... | :
_dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return s... | 221 | 221 | 739 | 6 | 214 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderRespResult | SecurityHeaderRespResult | 4,456 | 4,540 | 4,456 | 4,456 | 93a913bd9fc35ceba0d834bcae0d3cf92b8279a8 | bigcode/the-stack | train |
7b7e489c4cde3d54067f6000 | train | class | class MinTlsVersionResp():
"""
Minimum TLS Version response.
:attr MinTlsVersionRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returne... | class MinTlsVersionResp():
| """
Minimum TLS Version response.
:attr MinTlsVersionRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init_... | '] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary ... | 226 | 226 | 755 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinTlsVersionResp | MinTlsVersionResp | 6,528 | 6,612 | 6,528 | 6,528 | 65a5e86c38636907a80d3e2e4fad774f022ba658 | bigcode/the-stack | train |
0f48704823ad17e6e8ff26ca | train | class | class MinifyRespResultValue():
"""
Value.
:attr str css: css.
:attr str html: html.
:attr str js: js.
"""
def __init__(self,
css: str,
html: str,
js: str) -> None:
"""
Initialize a MinifyRespResultValue object.
:pa... | class MinifyRespResultValue():
| """
Value.
:attr str css: css.
:attr str html: html.
:attr str js: js.
"""
def __init__(self,
css: str,
html: str,
js: str) -> None:
"""
Initialize a MinifyRespResultValue object.
:param str css: css.
:para... | _to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this MinifyRespResult object."""
return json.dumps(self.to_dict(), indent=2... | 181 | 181 | 606 | 7 | 173 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinifyRespResultValue | MinifyRespResultValue | 3,506 | 3,580 | 3,506 | 3,506 | ea9d5d7d01b87a319fef53590971e45966fb42a4 | bigcode/the-stack | train |
7cdff76e82580f880ddb6721 | train | class | class ScriptLoadOptimizationResp():
"""
Script load optimization response.
:attr ScriptLoadOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] me... | class ScriptLoadOptimizationResp():
| """
Script load optimization response.
:attr ScriptLoadOptimizationRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary repr... | 227 | 227 | 759 | 6 | 220 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ScriptLoadOptimizationResp | ScriptLoadOptimizationResp | 7,222 | 7,308 | 7,222 | 7,222 | 9c9948d673ed177a271f2081bdb6fb3f9a19d22a | bigcode/the-stack | train |
6197f8cc45fc7692895710b0 | train | class | class TlsClientAuthRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
ed... | class TlsClientAuthRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()... | 221 | 221 | 738 | 8 | 212 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | TlsClientAuthRespResult | TlsClientAuthRespResult | 4,920 | 5,004 | 4,920 | 4,920 | 35b07220d905a489f923fc222ddd80dbd64cd370 | bigcode/the-stack | train |
2fb6d956bfbaa1e99b72df79 | train | class | class MobileRedirectRespResultValue():
"""
Value.
:attr str status: Whether or not the mobile redirection is enabled.
:attr str mobile_subdomain: Which subdomain prefix you wish to redirect visitors
on mobile devices to.
:attr bool strip_uri: Whether to drop the current page path and redi... | class MobileRedirectRespResultValue():
| """
Value.
:attr str status: Whether or not the mobile redirection is enabled.
:attr str mobile_subdomain: Which subdomain prefix you wish to redirect visitors
on mobile devices to.
:attr bool strip_uri: Whether to drop the current page path and redirect to the
mobile subdomain ... | ') and self.editable is not None:
_dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing... | 227 | 227 | 759 | 7 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MobileRedirectRespResultValue | MobileRedirectRespResultValue | 3,858 | 3,938 | 3,858 | 3,858 | 08a2ef52d6559c82eadf3d5acb17fb60a98d84c7 | bigcode/the-stack | train |
0cbc0c49c196b41ba4e597e4 | train | class | class OpportunisticEncryptionRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class OpportunisticEncryptionRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | dict['mobile_subdomain'] = self.mobile_subdomain
if hasattr(self, 'strip_uri') and self.strip_uri is not None:
_dict['strip_uri'] = self.strip_uri
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __st... | 219 | 219 | 732 | 7 | 211 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | OpportunisticEncryptionRespResult | OpportunisticEncryptionRespResult | 3,940 | 4,024 | 3,940 | 3,940 | fa86994944371e377a643c9e14e44ec3ae7f8fea | bigcode/the-stack | train |
1100c512c78298c0e4890fbb | train | class | class MobileRedirectRespResult():
"""
Container for response information.
:attr str id: ID.
:attr MobileRedirectRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
valu... | class MobileRedirectRespResult():
| """
Container for response information.
:attr str id: ID.
:attr MobileRedirectRespResultValue value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: 'MobileRedirectRespResultValue'... | '] = self.strip_uri
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this MobileRedirecSettingValue object."""
return json.dumps(self.to_dict(), indent=2... | 221 | 221 | 739 | 6 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MobileRedirectRespResult | MobileRedirectRespResult | 3,772 | 3,856 | 3,772 | 3,772 | 5d181511a744eaf6eed08c088a04a64fc092eda8 | bigcode/the-stack | train |
ca8b89da76ff938e65de817f | train | class | class ResponseBufferingResp():
"""
Buffering response.
:attr ResponseBufferingRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.... | class ResponseBufferingResp():
| """
Buffering response.
:attr ResponseBufferingRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self... |
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this... | 226 | 226 | 756 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ResponseBufferingResp | ResponseBufferingResp | 7,135 | 7,220 | 7,135 | 7,135 | 3cebd14a2ec26cbce4c258c3dd42941f55604b7c | bigcode/the-stack | train |
ca322753f50f26edf9bd735f | train | class | class OpportunisticEncryptionResp():
"""
Oppertunistic encryption response.
:attr OpportunisticEncryptionRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] ... | class OpportunisticEncryptionResp():
| """
Oppertunistic encryption response.
:attr OpportunisticEncryptionRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.... | dict['success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a jso... | 229 | 229 | 765 | 6 | 222 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | OpportunisticEncryptionResp | OpportunisticEncryptionResp | 6,786 | 6,872 | 6,786 | 6,786 | 067f18fce75bc61104d0e34cb79cdc2869d64b2a | bigcode/the-stack | train |
0c1d4b62d0b6f0cfa4d0eaca | train | class | class WebsocketsRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
edita... | class WebsocketsRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | WebsocketsRespResult | WebsocketsRespResult | 5,178 | 5,262 | 5,178 | 5,178 | 0ef6adf0f8e01ae311e45bf0f3ab6ce375355b12 | bigcode/the-stack | train |
0896285994eb3b91e62afdb8 | train | class | class ImageSizeOptimizationRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class ImageSizeOptimizationRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | ['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ImageSizeOptimizationRespResult | ImageSizeOptimizationRespResult | 2,990 | 3,074 | 2,990 | 2,990 | 6443bcb0a98bbc09db739fb70e0c04bac56302ab | bigcode/the-stack | train |
ce993bb759efbb9b895a93bb | train | class | class CiphersResp():
"""
Ciphers response.
:attr CiphersRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __in... | class CiphersResp():
| """
Ciphers response.
:attr CiphersRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | CiphersResp | CiphersResp | 5,748 | 5,832 | 5,748 | 5,748 | 8702f58ecdc810734176af153d37dfb79b8f822a | bigcode/the-stack | train |
2473a6515375a3488ca2d189 | train | class | class BrowserCheckResp():
"""
Browser Check response.
:attr BrowserCheckRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"... | class BrowserCheckResp():
| """
Browser Check response.
:attr BrowserCheckRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,... | 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | BrowserCheckResp | BrowserCheckResp | 5,576 | 5,660 | 5,576 | 5,576 | 674f81b03aadce243fea829b4c504a2c25db6119 | bigcode/the-stack | train |
ec7f88c9a3d55d52b119f932 | train | class | class WafResp():
"""
WAF Response.
:attr WafRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
... | class WafResp():
| """
WAF Response.
:attr WafRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,
r... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | WafResp | WafResp | 7,655 | 7,739 | 7,655 | 7,655 | 71a435990d0790ea50d86d584677485ea8f6f7f3 | bigcode/the-stack | train |
5bf6828789fdcc0428b5574d | train | class | class TrueClientIpResp():
"""
true client IP response.
:attr TrueClientIpRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
... | class TrueClientIpResp():
| """
true client IP response.
:attr TrueClientIpRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self... |
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this... | 226 | 226 | 755 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | TrueClientIpResp | TrueClientIpResp | 7,569 | 7,653 | 7,569 | 7,569 | adcab34954e5d6e19ed36eecb4d6f206d3b3e353 | bigcode/the-stack | train |
bd6d614b938193e77f962d4c | train | class | class MobileRedirectResp():
"""
Mobile Redirect Response.
:attr MobileRedirectRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.... | class MobileRedirectResp():
| """
Mobile Redirect Response.
:attr MobileRedirectRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(s... |
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this... | 221 | 221 | 738 | 5 | 215 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MobileRedirectResp | MobileRedirectResp | 6,700 | 6,784 | 6,700 | 6,700 | c00883ac19c6514086dc909ff7833f9d5b2d60dc | bigcode/the-stack | train |
522cdd0bbb7eb7792e3dd5e6 | train | class | class CiphersRespResult():
"""
Container for response information.
:attr str id: ID.
:attr List[str] value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: List[str],
... | class CiphersRespResult():
| """
Container for response information.
:attr str id: ID.
:attr List[str] value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: List[str],
editable: bool,
... | editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
de... | 216 | 216 | 722 | 6 | 209 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | CiphersRespResult | CiphersRespResult | 2,646 | 2,730 | 2,646 | 2,646 | 8834761ded6d1a44ff40c612ed6650e7977d5ee2 | bigcode/the-stack | train |
3be4f8b08ed1d6950207c144 | train | class | class ZonesCnameFlatteningResp():
"""
Zones CNAME flattening response.
:attr bool success: Was operation successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
:attr CnameFlatteningResponse result: CNAME Flattening resp... | class ZonesCnameFlatteningResp():
| """
Zones CNAME flattening response.
:attr bool success: Was operation successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
:attr CnameFlatteningResponse result: CNAME Flattening response.
"""
def __init__(se... | dict['success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a jso... | 234 | 234 | 781 | 8 | 225 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ZonesCnameFlatteningResp | ZonesCnameFlatteningResp | 7,827 | 7,911 | 7,827 | 7,827 | e1f35079e7bd05c94bff0ceba4091bd715c0bb02 | bigcode/the-stack | train |
aac02de8c55124f1f7a4808c | train | class | class PseudoIpv4RespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
edita... | class PseudoIpv4RespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
de... | 221 | 221 | 738 | 8 | 212 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | PseudoIpv4RespResult | PseudoIpv4RespResult | 4,198 | 4,282 | 4,198 | 4,198 | e07ba8368ddd396d2710bcd86f161cbc490ff039 | bigcode/the-stack | train |
2431a50906a665df0628aecb | train | class | class OriginErrorPagePassThruRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class OriginErrorPagePassThruRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | not None:
_dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 229 | 229 | 765 | 10 | 218 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | OriginErrorPagePassThruRespResult | OriginErrorPagePassThruRespResult | 4,026 | 4,110 | 4,026 | 4,026 | 8d5726d64c25352fad142d9ff2e9336ca801e9dc | bigcode/the-stack | train |
725b2e9b1db5c0918ab45e42 | train | class | class AlwaysUseHttpsResp():
"""
Always use http response.
:attr AlwaysUseHttpsRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.... | class AlwaysUseHttpsResp():
| """
Always use http response.
:attr AlwaysUseHttpsRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(s... | return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this ZonesDnssecRespResult object."""
return json.dumps(self.to_dict(), indent=2)
def __eq__(self, other: ... | 226 | 226 | 755 | 6 | 220 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | AlwaysUseHttpsResp | AlwaysUseHttpsResp | 5,402 | 5,486 | 5,402 | 5,402 | 1fe4d628a4660b904ed4358bd6206059252d431d | bigcode/the-stack | train |
4701d442504b6335578819e3 | train | class | class PrefetchPreloadResp():
"""
Prefetch & Preload Response.
:attr PrefetchPreloadRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages retu... | class PrefetchPreloadResp():
| """
Prefetch & Preload Response.
:attr PrefetchPreloadRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init... | hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
... | 232 | 232 | 775 | 7 | 224 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | PrefetchPreloadResp | PrefetchPreloadResp | 6,962 | 7,047 | 6,962 | 6,962 | b079d9ab315e4c33cfeb6771336b7031ed42f072 | bigcode/the-stack | train |
d06391cf73258801dea2fee3 | train | class | class SecurityHeaderRespResultValue():
"""
Value.
:attr SecurityHeaderRespResultValueStrictTransportSecurity
strict_transport_security: Strict transport security.
"""
def __init__(self,
strict_transport_security: 'SecurityHeaderRespResultValueStrictTransportSecurity') ->... | class SecurityHeaderRespResultValue():
| """
Value.
:attr SecurityHeaderRespResultValueStrictTransportSecurity
strict_transport_security: Strict transport security.
"""
def __init__(self,
strict_transport_security: 'SecurityHeaderRespResultValueStrictTransportSecurity') -> None:
"""
Initialize a... | str__(self) -> str:
"""Return a `str` version of this SecurityHeaderRespResult object."""
return json.dumps(self.to_dict(), indent=2)
def __eq__(self, other: 'SecurityHeaderRespResult') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(ot... | 144 | 144 | 482 | 7 | 136 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderRespResultValue | SecurityHeaderRespResultValue | 4,542 | 4,598 | 4,542 | 4,542 | 2c4d67ad256cb32c6cbbdbe7825366339fea952a | bigcode/the-stack | train |
d2131b5035d870c41fdc8164 | train | class | class HotlinkProtectionRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
... | class HotlinkProtectionRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | HotlinkProtectionRespResult | HotlinkProtectionRespResult | 2,732 | 2,816 | 2,732 | 2,732 | ddc9f414d63d04c0a0a909ee6da35b9dbf5565b0 | bigcode/the-stack | train |
8cb99b2afb871f9958b48f9b | train | class | class Http2RespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: ... | class Http2RespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | '] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str_... | 215 | 215 | 717 | 6 | 208 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | Http2RespResult | Http2RespResult | 2,818 | 2,902 | 2,818 | 2,818 | 9973e5aa4ec006c6229e6030ecb8d64f654d1e04 | bigcode/the-stack | train |
2dca439a84e54edd35c32c4d | train | class | class ChallengeTtlResp():
"""
challenge TTL response.
:attr ChallengeTtlRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"... | class ChallengeTtlResp():
| """
challenge TTL response.
:attr ChallengeTtlRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __init__(self,... | '] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):
"""Return a json dictionary ... | 226 | 226 | 754 | 6 | 219 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | ChallengeTtlResp | ChallengeTtlResp | 5,662 | 5,746 | 5,662 | 5,662 | 4e362408c46fcb471d5cd9004013fcc079e29db9 | bigcode/the-stack | train |
afcea644af0a398a4520eed7 | train | class | class MinTlsVersionRespResult():
"""
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
ed... | class MinTlsVersionRespResult():
| """
Container for response information.
:attr str id: ID.
:attr str value: Value.
:attr bool editable: Editable.
:attr datetime modified_on: Modified date.
"""
def __init__(self,
id: str,
value: str,
editable: bool,
mo... | _dict['editable'] = self.editable
if hasattr(self, 'modified_on') and self.modified_on is not None:
_dict['modified_on'] = datetime_to_string(self.modified_on)
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return sel... | 218 | 218 | 729 | 7 | 210 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | MinTlsVersionRespResult | MinTlsVersionRespResult | 3,334 | 3,418 | 3,334 | 3,334 | 3ccc7013d558d7f61379196c761934243dd2b279 | bigcode/the-stack | train |
653dd2c54c013f9ba1fc5211 | train | class | class HotlinkProtectionResp():
"""
Hotlink Protection response.
:attr HotlinkProtectionRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages ... | class HotlinkProtectionResp():
| """
Hotlink Protection response.
:attr HotlinkProtectionRespResult result: Container for response information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages returned.
"""
def __in... | None:
_dict['editable'] = self.editable
return _dict
def _to_dict(self):
"""Return a json dictionary representing this model."""
return self.to_dict()
def __str__(self) -> str:
"""Return a `str` version of this CnameFlatteningResponse object."""
return json... | 227 | 227 | 757 | 6 | 221 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | HotlinkProtectionResp | HotlinkProtectionResp | 5,921 | 6,006 | 5,921 | 5,921 | 61d0b813f678d62789f30a843ef7383b65a21fc3 | bigcode/the-stack | train |
29ad7540f0838983c6da7949 | train | class | class SecurityHeaderSettingValueStrictTransportSecurity():
"""
Strict transport security.
:attr bool enabled: Whether or not security header is enabled.
:attr int max_age: Max age in seconds.
:attr bool include_subdomains: Include all subdomains.
:attr bool nosniff: Whether or not to include 'X... | class SecurityHeaderSettingValueStrictTransportSecurity():
| """
Strict transport security.
:attr bool enabled: Whether or not security header is enabled.
:attr int max_age: Max age in seconds.
:attr bool include_subdomains: Include all subdomains.
:attr bool nosniff: Whether or not to include 'X-Content-Type-Options:nosniff'
header.
"""
... | Initialize a SecurityHeaderSettingValue object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'strict_transport_security') and self.strict_transport_security is not... | 256 | 256 | 857 | 9 | 246 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | SecurityHeaderSettingValueStrictTransportSecurity | SecurityHeaderSettingValueStrictTransportSecurity | 4,746 | 4,832 | 4,746 | 4,746 | 36e2e912d2d0df5ab6535b377601de3498072d6c | bigcode/the-stack | train |
1c5af6838b3520ca41713a73 | train | class | class OriginErrorPagePassThruResp():
"""
origin error page pass through response.
:attr OriginErrorPagePassThruRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[... | class OriginErrorPagePassThruResp():
| """
origin error page pass through response.
:attr OriginErrorPagePassThruRespResult result: Container for response
information.
:attr bool success: Was the get successful.
:attr List[List[str]] errors: Array of errors encountered.
:attr List[List[str]] messages: Array of messages ret... | not None:
_dict['success'] = self.success
if hasattr(self, 'errors') and self.errors is not None:
_dict['errors'] = self.errors
if hasattr(self, 'messages') and self.messages is not None:
_dict['messages'] = self.messages
return _dict
def _to_dict(self):... | 242 | 242 | 809 | 9 | 232 | mauriceDevsM/networking-python-sdk | ibm_cloud_networking_services/zones_settings_v1.py | Python | OriginErrorPagePassThruResp | OriginErrorPagePassThruResp | 6,874 | 6,960 | 6,874 | 6,874 | e3ef04d52459235eb826c12a8ab5c3ca1a7a3391 | bigcode/the-stack | train |
49274b50eb566cc3b3a3a736 | train | class | class AboutForm(QtWidgets.QWidget, Ui_Form):
def __init__(self):
super(AboutForm, self).__init__()
self.setupUi(self)
self.license_form = LicenseForm()
def setupUi(self, Form):
Ui_Form.setupUi(self, Form)
# self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.T... | class AboutForm(QtWidgets.QWidget, Ui_Form):
| def __init__(self):
super(AboutForm, self).__init__()
self.setupUi(self)
self.license_form = LicenseForm()
def setupUi(self, Form):
Ui_Form.setupUi(self, Form)
# self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool)
self.setWindowFlags(QtCore.Qt.Wi... | zhouhang@idataway.com
# @Software : Python 3.9
# @About : 关于界面
from uiAboutForm import Ui_Form
from formLicense import LicenseForm
from PySide6 import QtWidgets, QtCore
class AboutForm(QtWidgets.QWidget, Ui_Form):
| 64 | 64 | 212 | 11 | 52 | casuallyName/text-tools | formAbout.py | Python | AboutForm | AboutForm | 14 | 37 | 14 | 14 | 4bdea6a38acc2c64b1ddd0b29e5f19160bfc45ec | bigcode/the-stack | train |
4775f2fbb3854f011e1c3d5b | train | class | @slash.requires(have_gst)
@slash.requires(*have_gst_element("vaapi"))
@slash.requires(*have_gst_element("vaapipostproc"))
@slash.requires(*have_gst_element("checksumsink2"))
class VppTest(slash.Test):
def before(self):
self.refctx = []
def gen_input_opts(self):
if self.vpp_element not in ["deinterlace"]:
... | @slash.requires(have_gst)
@slash.requires(*have_gst_element("vaapi"))
@slash.requires(*have_gst_element("vaapipostproc"))
@slash.requires(*have_gst_element("checksumsink2"))
class VppTest(slash.Test):
| def before(self):
self.refctx = []
def gen_input_opts(self):
if self.vpp_element not in ["deinterlace"]:
opts = "filesrc location={source} num-buffers={frames}"
opts += " ! rawvideoparse format={mformat} width={width} height={height}"
else:
opts = "filesrc location={source}"
o... | ###
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from .util import *
@slash.requires(have_gst)
@slash.requires(*have_gst_element("vaapi"))
@slash.requires(*have_gst_element("vaapipostproc"))
@slash.requires(*have_gst_element("checksumsink2"))
cla... | 94 | 256 | 1,523 | 57 | 37 | Bin-QA/vaapi-fits | lib/gstreamer/vaapi/vpp.py | Python | VppTest | VppTest | 10 | 162 | 10 | 14 | 0ca7ac41110d855e57fec9690ecc65df927d3611 | bigcode/the-stack | train |
83f1b7cce8e1dee77372efee | train | class | class MarketConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'market'
| class MarketConfig(AppConfig):
| default_auto_field = 'django.db.models.BigAutoField'
name = 'market'
| from django.apps import AppConfig
class MarketConfig(AppConfig):
| 13 | 64 | 25 | 6 | 6 | landges/salda | salda_engine/market/apps.py | Python | MarketConfig | MarketConfig | 4 | 6 | 4 | 4 | 65fac6c18fba0ddfd382dd73534d3f0d046315ee | bigcode/the-stack | train |
fc328cb11c0ce6616c2df4c2 | train | function | def _logsum_expbig_minus_expsmall(big, small):
"""Stable evaluation of `Log[exp{big} - exp{small}]`.
To work correctly, we should have the pointwise relation: `small <= big`.
Args:
big: Floating-point `Tensor`
small: Floating-point `Tensor` with same `dtype` as `big` and broadcastable
shape.
R... | def _logsum_expbig_minus_expsmall(big, small):
| """Stable evaluation of `Log[exp{big} - exp{small}]`.
To work correctly, we should have the pointwise relation: `small <= big`.
Args:
big: Floating-point `Tensor`
small: Floating-point `Tensor` with same `dtype` as `big` and broadcastable
shape.
Returns:
`Tensor` of same `dtype` of `big` a... | as np
import tensorflow as tf
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops.distributions import distribution as distributions
from tensorflow.python.ops.distributions import util as distribution_util
__all__ = ["QuantizedDistribution"]
def _logsum_expbig_minus_expsmall(big, small):
| 63 | 64 | 147 | 14 | 49 | a-arbabi/probability | tensorflow_probability/python/distributions/quantized_distribution.py | Python | _logsum_expbig_minus_expsmall | _logsum_expbig_minus_expsmall | 32 | 46 | 32 | 32 | af7f97184635101335d325ee8a08e259dbc46a71 | bigcode/the-stack | train |
a4d23b6570975ad3fb9ed848 | train | class | class QuantizedDistribution(distributions.Distribution):
"""Distribution representing the quantization `Y = ceiling(X)`.
#### Definition in Terms of Sampling
```
1. Draw X
2. Set Y <-- ceiling(X)
3. If Y < low, reset Y <-- low
4. If Y > high, reset Y <-- high
5. Return Y
```
#### Definition in Te... | class QuantizedDistribution(distributions.Distribution):
| """Distribution representing the quantization `Y = ceiling(X)`.
#### Definition in Terms of Sampling
```
1. Draw X
2. Set Y <-- ceiling(X)
3. If Y < low, reset Y <-- low
4. If Y > high, reset Y <-- high
5. Return Y
```
#### Definition in Terms of the Probability Mass Function
Given scalar rand... | that fractional `y` are first floored to a whole number, and
then above definition applies.
"""
_cdf_note = _cdf_base_note + """
The base distribution's `cdf` method must be defined on `y - 1`.
"""
_log_cdf_note = _cdf_base_note + """
The base distribution's `log_cdf` method must be defined on `y - 1`.
"""
_sf_bas... | 256 | 256 | 4,077 | 9 | 247 | a-arbabi/probability | tensorflow_probability/python/distributions/quantized_distribution.py | Python | QuantizedDistribution | QuantizedDistribution | 126 | 557 | 126 | 126 | c9b543381b1c82aee05d1b8cbd30afe6cf447090 | bigcode/the-stack | train |
d34a926676d2af99aa4472f6 | train | class | class RadarRelayOrderBookTracker(OrderBookTracker):
_rrobt_logger: Optional[HummingbotLogger] = None
@classmethod
def logger(cls) -> HummingbotLogger:
if cls._rrobt_logger is None:
cls._rrobt_logger = logging.getLogger(__name__)
return cls._rrobt_logger
def __init__(self,
... | class RadarRelayOrderBookTracker(OrderBookTracker):
| _rrobt_logger: Optional[HummingbotLogger] = None
@classmethod
def logger(cls) -> HummingbotLogger:
if cls._rrobt_logger is None:
cls._rrobt_logger = logging.getLogger(__name__)
return cls._rrobt_logger
def __init__(self,
data_source_type: OrderBookTrackerDa... | #!/usr/bin/env python
import asyncio
import bisect
from collections import deque, defaultdict
import logging
import time
from typing import (
Deque,
Dict,
List,
Optional,
Set
)
from hummingbot.core.event.events import TradeType
from hummingbot.logger import HummingbotLogger
from hummingbot.core.da... | 245 | 256 | 2,178 | 10 | 234 | sanchaymittal/hummingbot | hummingbot/market/radar_relay/radar_relay_order_book_tracker.py | Python | RadarRelayOrderBookTracker | RadarRelayOrderBookTracker | 32 | 239 | 32 | 32 | ff0d376b7b9154b4c380dfc09306b07d29f2150c | bigcode/the-stack | train |
dc5ef43039ef6c62d15d88f6 | train | class | class BulkSaveTests(PostgreSQLTestCase):
def test_bulk_update(self):
test_data = [
(IntegerArrayModel, 'field', [], [1, 2, 3]),
(NullableIntegerArrayModel, 'field', [1, 2, 3], None),
(JSONModel, 'field', {'a': 'b'}, {'c': 'd'}),
(NestedIntegerArrayModel,... | class BulkSaveTests(PostgreSQLTestCase):
| def test_bulk_update(self):
test_data = [
(IntegerArrayModel, 'field', [], [1, 2, 3]),
(NullableIntegerArrayModel, 'field', [1, 2, 3], None),
(JSONModel, 'field', {'a': 'b'}, {'c': 'd'}),
(NestedIntegerArrayModel, 'field', [], [[1, 2, 3]]),
(... | import PostgreSQLTestCase
from .models import (
HStoreModel, IntegerArrayModel, JSONModel, NestedIntegerArrayModel,
NullableIntegerArrayModel, OtherTypesArrayModel, RangesModel,
)
try:
from psycopg2.extras import NumericRange, DateRange
except ImportError:
pass # psycopg2 isn't installed.
cl... | 86 | 87 | 292 | 10 | 76 | Yoann-Vie/esgi-hearthstone | tests/postgres_tests/test_bulk_update.py | Python | BulkSaveTests | BulkSaveTests | 15 | 34 | 15 | 15 | 1004f1059d1811f492bae3d7bd12d2452c9b5c06 | bigcode/the-stack | train |
71e11bfbf4da5ab28afefffa | train | class | class preprocessing(object):
def __init__(self, env, frame_skip=4, terminal_on_life_loss=False,
size=84, max_episode_steps=2000):
self.max_episode_steps = max_episode_steps
self.env = env
self.terminal_on_life_loss = terminal_on_life_loss
self.frame_skip = frame_ski... | class preprocessing(object):
| def __init__(self, env, frame_skip=4, terminal_on_life_loss=False,
size=84, max_episode_steps=2000):
self.max_episode_steps = max_episode_steps
self.env = env
self.terminal_on_life_loss = terminal_on_life_loss
self.frame_skip = frame_skip
self.size = size
... | import cv2
import gym
import numpy as np
from gym.spaces.box import Box
def create_atari_environment(name=None, sticky_actions=True,
max_episode_steps=2000):
game_version = 'v0' if sticky_actions else 'v4'
name = '{}NoFrameskip-{}'.format(name, game_version)
env = gym.make(nam... | 105 | 219 | 733 | 4 | 100 | DZ9/tianshou | tianshou/env/atari.py | Python | preprocessing | preprocessing | 17 | 121 | 17 | 18 | c55ca448596b87e3d36c147ba84a7dafeba047a8 | bigcode/the-stack | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.