text
stringlengths 5
22M
| id
stringlengths 12
177
| metadata
dict | __index_level_0__
int64 0
1.37k
|
---|---|---|---|
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...client import Client
from . import models
class AuditClient(Client):
"""Audit
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(AuditClient, self).__init__(base_url, creds)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
resource_area_identifier = '94ff054d-5ee1-413d-9341-3f4a7827de2e'
def get_actions(self, area_name=None):
"""GetActions.
[Preview API] Get all auditable actions filterable by area.
:param str area_name: Optional. Get actions scoped to area
:rtype: [AuditActionInfo]
"""
query_parameters = {}
if area_name is not None:
query_parameters['areaName'] = self._serialize.query('area_name', area_name, 'str')
response = self._send(http_method='GET',
location_id='6fa30b9a-9558-4e3b-a95f-a12572caa6e6',
version='7.1-preview.1',
query_parameters=query_parameters)
return self._deserialize('[AuditActionInfo]', self._unwrap_collection(response))
def query_log(self, start_time=None, end_time=None, batch_size=None, continuation_token=None, skip_aggregation=None):
"""QueryLog.
[Preview API] Queries audit log entries
:param datetime start_time: Start time of download window. Optional
:param datetime end_time: End time of download window. Optional
:param int batch_size: Max number of results to return. Optional
:param str continuation_token: Token used for returning next set of results from previous query. Optional
:param bool skip_aggregation: Skips aggregating events and leaves them as individual entries instead. By default events are aggregated. Event types that are aggregated: AuditLog.AccessLog.
:rtype: :class:`<AuditLogQueryResult> <azure.devops.v7_1.audit.models.AuditLogQueryResult>`
"""
query_parameters = {}
if start_time is not None:
query_parameters['startTime'] = self._serialize.query('start_time', start_time, 'iso-8601')
if end_time is not None:
query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601')
if batch_size is not None:
query_parameters['batchSize'] = self._serialize.query('batch_size', batch_size, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str')
if skip_aggregation is not None:
query_parameters['skipAggregation'] = self._serialize.query('skip_aggregation', skip_aggregation, 'bool')
response = self._send(http_method='GET',
location_id='4e5fa14f-7097-4b73-9c85-00abc7353c61',
version='7.1-preview.1',
query_parameters=query_parameters)
return self._deserialize('AuditLogQueryResult', response)
def download_log(self, format, start_time=None, end_time=None, **kwargs):
"""DownloadLog.
[Preview API] Downloads audit log entries.
:param str format: File format for download. Can be "json" or "csv".
:param datetime start_time: Start time of download window. Optional
:param datetime end_time: End time of download window. Optional
:rtype: object
"""
query_parameters = {}
if format is not None:
query_parameters['format'] = self._serialize.query('format', format, 'str')
if start_time is not None:
query_parameters['startTime'] = self._serialize.query('start_time', start_time, 'iso-8601')
if end_time is not None:
query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601')
response = self._send(http_method='GET',
location_id='b7b98a76-04e8-4f4d-ac72-9d46492caaac',
version='7.1-preview.1',
query_parameters=query_parameters,
accept_media_type='application/octet-stream')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
return self._client.stream_download(response, callback=callback)
def create_stream(self, stream, days_to_backfill):
"""CreateStream.
[Preview API] Create new Audit Stream
:param :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>` stream: Stream entry
:param int days_to_backfill: The number of days of previously recorded audit data that will be replayed into the stream. A value of zero will result in only new events being streamed.
:rtype: :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>`
"""
query_parameters = {}
if days_to_backfill is not None:
query_parameters['daysToBackfill'] = self._serialize.query('days_to_backfill', days_to_backfill, 'int')
content = self._serialize.body(stream, 'AuditStream')
response = self._send(http_method='POST',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1',
query_parameters=query_parameters,
content=content)
return self._deserialize('AuditStream', response)
def delete_stream(self, stream_id):
"""DeleteStream.
[Preview API] Delete Audit Stream
:param int stream_id: Id of stream entry to delete
"""
route_values = {}
if stream_id is not None:
route_values['streamId'] = self._serialize.url('stream_id', stream_id, 'int')
self._send(http_method='DELETE',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1',
route_values=route_values)
def query_all_streams(self):
"""QueryAllStreams.
[Preview API] Return all Audit Streams scoped to an organization
:rtype: [AuditStream]
"""
response = self._send(http_method='GET',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1')
return self._deserialize('[AuditStream]', self._unwrap_collection(response))
def query_stream_by_id(self, stream_id):
"""QueryStreamById.
[Preview API] Return Audit Stream with id of streamId if one exists otherwise throw
:param int stream_id: Id of stream entry to retrieve
:rtype: :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>`
"""
route_values = {}
if stream_id is not None:
route_values['streamId'] = self._serialize.url('stream_id', stream_id, 'int')
response = self._send(http_method='GET',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('AuditStream', response)
def update_status(self, stream_id, status):
"""UpdateStatus.
[Preview API] Update existing Audit Stream status
:param int stream_id: Id of stream entry to be updated
:param str status: Status of the stream
:rtype: :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>`
"""
route_values = {}
if stream_id is not None:
route_values['streamId'] = self._serialize.url('stream_id', stream_id, 'int')
query_parameters = {}
if status is not None:
query_parameters['status'] = self._serialize.query('status', status, 'str')
response = self._send(http_method='PUT',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('AuditStream', response)
def update_stream(self, stream):
"""UpdateStream.
[Preview API] Update existing Audit Stream
:param :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>` stream: Stream entry
:rtype: :class:`<AuditStream> <azure.devops.v7_1.audit.models.AuditStream>`
"""
content = self._serialize.body(stream, 'AuditStream')
response = self._send(http_method='PUT',
location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b',
version='7.1-preview.1',
content=content)
return self._deserialize('AuditStream', response)
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/audit/audit_client.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/audit/audit_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 4276
}
| 338 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...client import Client
from . import models
class CoreClient(Client):
"""Core
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(CoreClient, self).__init__(base_url, creds)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
resource_area_identifier = '79134c72-4a58-4b42-976c-04e7115f32bf'
def remove_project_avatar(self, project_id):
"""RemoveProjectAvatar.
[Preview API] Removes the avatar for the project.
:param str project_id: The ID or name of the project.
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
self._send(http_method='DELETE',
location_id='54b2a2a0-859b-4d05-827c-ec4c862f641a',
version='7.1-preview.1',
route_values=route_values)
def set_project_avatar(self, avatar_blob, project_id):
"""SetProjectAvatar.
[Preview API] Sets the avatar for the project.
:param :class:`<ProjectAvatar> <azure.devops.v7_1.core.models.ProjectAvatar>` avatar_blob: The avatar blob data object to upload.
:param str project_id: The ID or name of the project.
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(avatar_blob, 'ProjectAvatar')
self._send(http_method='PUT',
location_id='54b2a2a0-859b-4d05-827c-ec4c862f641a',
version='7.1-preview.1',
route_values=route_values,
content=content)
def create_connected_service(self, connected_service_creation_data, project_id):
"""CreateConnectedService.
[Preview API]
:param :class:`<WebApiConnectedServiceDetails> <azure.devops.v7_1.core.models.WebApiConnectedServiceDetails>` connected_service_creation_data:
:param str project_id:
:rtype: :class:`<WebApiConnectedService> <azure.devops.v7_1.core.models.WebApiConnectedService>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(connected_service_creation_data, 'WebApiConnectedServiceDetails')
response = self._send(http_method='POST',
location_id='b4f70219-e18b-42c5-abe3-98b07d35525e',
version='7.1-preview.1',
route_values=route_values,
content=content)
return self._deserialize('WebApiConnectedService', response)
def get_connected_service_details(self, project_id, name):
"""GetConnectedServiceDetails.
[Preview API]
:param str project_id:
:param str name:
:rtype: :class:`<WebApiConnectedServiceDetails> <azure.devops.v7_1.core.models.WebApiConnectedServiceDetails>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if name is not None:
route_values['name'] = self._serialize.url('name', name, 'str')
response = self._send(http_method='GET',
location_id='b4f70219-e18b-42c5-abe3-98b07d35525e',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('WebApiConnectedServiceDetails', response)
def get_connected_services(self, project_id, kind=None):
"""GetConnectedServices.
[Preview API]
:param str project_id:
:param str kind:
:rtype: [WebApiConnectedService]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if kind is not None:
query_parameters['kind'] = self._serialize.query('kind', kind, 'str')
response = self._send(http_method='GET',
location_id='b4f70219-e18b-42c5-abe3-98b07d35525e',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[WebApiConnectedService]', self._unwrap_collection(response))
def get_team_members_with_extended_properties(self, project_id, team_id, top=None, skip=None):
"""GetTeamMembersWithExtendedProperties.
[Preview API] Get a list of members for a specific team.
:param str project_id: The name or ID (GUID) of the team project the team belongs to.
:param str team_id: The name or ID (GUID) of the team .
:param int top:
:param int skip:
:rtype: [TeamMember]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
query_parameters = {}
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='294c494c-2600-4d7e-b76c-3dd50c3c95be',
version='7.1-preview.2',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TeamMember]', self._unwrap_collection(response))
def get_process_by_id(self, process_id):
"""GetProcessById.
[Preview API] Get a process by ID.
:param str process_id: ID for a process.
:rtype: :class:`<Process> <azure.devops.v7_1.core.models.Process>`
"""
route_values = {}
if process_id is not None:
route_values['processId'] = self._serialize.url('process_id', process_id, 'str')
response = self._send(http_method='GET',
location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('Process', response)
def get_processes(self):
"""GetProcesses.
[Preview API] Get a list of processes.
:rtype: [Process]
"""
response = self._send(http_method='GET',
location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8',
version='7.1-preview.1')
return self._deserialize('[Process]', self._unwrap_collection(response))
def get_project_collection(self, collection_id):
"""GetProjectCollection.
[Preview API] Get project collection with the specified id or name.
:param str collection_id:
:rtype: :class:`<TeamProjectCollection> <azure.devops.v7_1.core.models.TeamProjectCollection>`
"""
route_values = {}
if collection_id is not None:
route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str')
response = self._send(http_method='GET',
location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf',
version='7.1-preview.2',
route_values=route_values)
return self._deserialize('TeamProjectCollection', response)
def get_project_collections(self, top=None, skip=None):
"""GetProjectCollections.
[Preview API] Get project collection references for this application.
:param int top:
:param int skip:
:rtype: [TeamProjectCollectionReference]
"""
query_parameters = {}
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf',
version='7.1-preview.2',
query_parameters=query_parameters)
return self._deserialize('[TeamProjectCollectionReference]', self._unwrap_collection(response))
def get_project(self, project_id, include_capabilities=None, include_history=None):
"""GetProject.
[Preview API] Get project with the specified id or name, optionally including capabilities.
:param str project_id:
:param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false).
:param bool include_history: Search within renamed projects (that had such name in the past).
:rtype: :class:`<TeamProject> <azure.devops.v7_1.core.models.TeamProject>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if include_capabilities is not None:
query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool')
if include_history is not None:
query_parameters['includeHistory'] = self._serialize.query('include_history', include_history, 'bool')
response = self._send(http_method='GET',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='7.1-preview.4',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TeamProject', response)
def get_projects(self, state_filter=None, top=None, skip=None, continuation_token=None, get_default_team_image_url=None):
"""GetProjects.
[Preview API] Get all projects in the organization that the authenticated user has access to.
:param str state_filter: Filter on team projects in a specific team project state (default: WellFormed).
:param int top:
:param int skip:
:param int continuation_token: Pointer that shows how many projects already been fetched.
:param bool get_default_team_image_url:
:rtype: :class:`<[TeamProjectReference]> <azure.devops.v7_1.core.models.[TeamProjectReference]>`
"""
query_parameters = {}
if state_filter is not None:
query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int')
if get_default_team_image_url is not None:
query_parameters['getDefaultTeamImageUrl'] = self._serialize.query('get_default_team_image_url', get_default_team_image_url, 'bool')
response = self._send(http_method='GET',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='7.1-preview.4',
query_parameters=query_parameters)
return self._deserialize('[TeamProjectReference]', self._unwrap_collection(response))
def queue_create_project(self, project_to_create):
"""QueueCreateProject.
[Preview API] Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
:param :class:`<TeamProject> <azure.devops.v7_1.core.models.TeamProject>` project_to_create: The project to create.
:rtype: :class:`<OperationReference> <azure.devops.v7_1.core.models.OperationReference>`
"""
content = self._serialize.body(project_to_create, 'TeamProject')
response = self._send(http_method='POST',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='7.1-preview.4',
content=content)
return self._deserialize('OperationReference', response)
def queue_delete_project(self, project_id):
"""QueueDeleteProject.
[Preview API] Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
:param str project_id: The project id of the project to delete.
:rtype: :class:`<OperationReference> <azure.devops.v7_1.core.models.OperationReference>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
response = self._send(http_method='DELETE',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='7.1-preview.4',
route_values=route_values)
return self._deserialize('OperationReference', response)
def update_project(self, project_update, project_id):
"""UpdateProject.
[Preview API] Update an existing project's name, abbreviation, description, or restore a project.
:param :class:`<TeamProject> <azure.devops.v7_1.core.models.TeamProject>` project_update: The updates for the project. The state must be set to wellFormed to restore the project.
:param str project_id: The project id of the project to update.
:rtype: :class:`<OperationReference> <azure.devops.v7_1.core.models.OperationReference>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(project_update, 'TeamProject')
response = self._send(http_method='PATCH',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='7.1-preview.4',
route_values=route_values,
content=content)
return self._deserialize('OperationReference', response)
def get_project_properties(self, project_id, keys=None):
"""GetProjectProperties.
[Preview API] Get a collection of team project properties.
:param str project_id: The team project ID.
:param [str] keys: A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned.
:rtype: [ProjectProperty]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if keys is not None:
keys = ",".join(keys)
query_parameters['keys'] = self._serialize.query('keys', keys, 'str')
response = self._send(http_method='GET',
location_id='4976a71a-4487-49aa-8aab-a1eda469037a',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ProjectProperty]', self._unwrap_collection(response))
def set_project_properties(self, project_id, patch_document):
"""SetProjectProperties.
[Preview API] Create, update, and delete team project properties.
:param str project_id: The team project ID.
:param :class:`<[JsonPatchOperation]> <azure.devops.v7_1.core.models.[JsonPatchOperation]>` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name.
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(patch_document, '[JsonPatchOperation]')
self._send(http_method='PATCH',
location_id='4976a71a-4487-49aa-8aab-a1eda469037a',
version='7.1-preview.1',
route_values=route_values,
content=content,
media_type='application/json-patch+json')
def create_or_update_proxy(self, proxy):
"""CreateOrUpdateProxy.
[Preview API]
:param :class:`<Proxy> <azure.devops.v7_1.core.models.Proxy>` proxy:
:rtype: :class:`<Proxy> <azure.devops.v7_1.core.models.Proxy>`
"""
content = self._serialize.body(proxy, 'Proxy')
response = self._send(http_method='PUT',
location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908',
version='7.1-preview.2',
content=content)
return self._deserialize('Proxy', response)
def delete_proxy(self, proxy_url, site=None):
"""DeleteProxy.
[Preview API]
:param str proxy_url:
:param str site:
"""
query_parameters = {}
if proxy_url is not None:
query_parameters['proxyUrl'] = self._serialize.query('proxy_url', proxy_url, 'str')
if site is not None:
query_parameters['site'] = self._serialize.query('site', site, 'str')
self._send(http_method='DELETE',
location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908',
version='7.1-preview.2',
query_parameters=query_parameters)
def get_proxies(self, proxy_url=None):
"""GetProxies.
[Preview API]
:param str proxy_url:
:rtype: [Proxy]
"""
query_parameters = {}
if proxy_url is not None:
query_parameters['proxyUrl'] = self._serialize.query('proxy_url', proxy_url, 'str')
response = self._send(http_method='GET',
location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908',
version='7.1-preview.2',
query_parameters=query_parameters)
return self._deserialize('[Proxy]', self._unwrap_collection(response))
def get_all_teams(self, mine=None, top=None, skip=None, expand_identity=None):
"""GetAllTeams.
[Preview API] Get a list of all teams.
:param bool mine: If true, then return all teams requesting user is member. Otherwise return all teams user has read access.
:param int top: Maximum number of teams to return.
:param int skip: Number of teams to skip.
:param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object.
:rtype: [WebApiTeam]
"""
query_parameters = {}
if mine is not None:
query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if expand_identity is not None:
query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool')
response = self._send(http_method='GET',
location_id='7a4d9ee9-3433-4347-b47a-7a80f1cf307e',
version='7.1-preview.3',
query_parameters=query_parameters)
return self._deserialize('[WebApiTeam]', self._unwrap_collection(response))
def create_team(self, team, project_id):
"""CreateTeam.
[Preview API] Create a team in a team project.
:param :class:`<WebApiTeam> <azure.devops.v7_1.core.models.WebApiTeam>` team: The team data used to create the team.
:param str project_id: The name or ID (GUID) of the team project in which to create the team.
:rtype: :class:`<WebApiTeam> <azure.devops.v7_1.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(team, 'WebApiTeam')
response = self._send(http_method='POST',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='7.1-preview.3',
route_values=route_values,
content=content)
return self._deserialize('WebApiTeam', response)
def delete_team(self, project_id, team_id):
"""DeleteTeam.
[Preview API] Delete a team.
:param str project_id: The name or ID (GUID) of the team project containing the team to delete.
:param str team_id: The name or ID of the team to delete.
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
self._send(http_method='DELETE',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='7.1-preview.3',
route_values=route_values)
def get_team(self, project_id, team_id, expand_identity=None):
"""GetTeam.
[Preview API] Get a specific team.
:param str project_id: The name or ID (GUID) of the team project containing the team.
:param str team_id: The name or ID (GUID) of the team.
:param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object.
:rtype: :class:`<WebApiTeam> <azure.devops.v7_1.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
query_parameters = {}
if expand_identity is not None:
query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool')
response = self._send(http_method='GET',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='7.1-preview.3',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('WebApiTeam', response)
def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity=None):
"""GetTeams.
[Preview API] Get a list of teams.
:param str project_id:
:param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access.
:param int top: Maximum number of teams to return.
:param int skip: Number of teams to skip.
:param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object.
:rtype: [WebApiTeam]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if mine is not None:
query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if expand_identity is not None:
query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool')
response = self._send(http_method='GET',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='7.1-preview.3',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[WebApiTeam]', self._unwrap_collection(response))
def update_team(self, team_data, project_id, team_id):
"""UpdateTeam.
[Preview API] Update a team's name and/or description.
:param :class:`<WebApiTeam> <azure.devops.v7_1.core.models.WebApiTeam>` team_data:
:param str project_id: The name or ID (GUID) of the team project containing the team to update.
:param str team_id: The name of ID of the team to update.
:rtype: :class:`<WebApiTeam> <azure.devops.v7_1.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
content = self._serialize.body(team_data, 'WebApiTeam')
response = self._send(http_method='PATCH',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='7.1-preview.3',
route_values=route_values,
content=content)
return self._deserialize('WebApiTeam', response)
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/core/core_client.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/core/core_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 12369
}
| 339 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class FeatureFlag(Model):
"""
:param description:
:type description: str
:param effective_state:
:type effective_state: str
:param explicit_state:
:type explicit_state: str
:param name:
:type name: str
:param uri:
:type uri: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'effective_state': {'key': 'effectiveState', 'type': 'str'},
'explicit_state': {'key': 'explicitState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'uri': {'key': 'uri', 'type': 'str'}
}
def __init__(self, description=None, effective_state=None, explicit_state=None, name=None, uri=None):
super(FeatureFlag, self).__init__()
self.description = description
self.effective_state = effective_state
self.explicit_state = explicit_state
self.name = name
self.uri = uri
class FeatureFlagPatch(Model):
"""
This is passed to the FeatureFlagController to edit the status of a feature flag
:param state:
:type state: str
"""
_attribute_map = {
'state': {'key': 'state', 'type': 'str'}
}
def __init__(self, state=None):
super(FeatureFlagPatch, self).__init__()
self.state = state
__all__ = [
'FeatureFlag',
'FeatureFlagPatch',
]
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/feature_availability/models.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/feature_availability/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 649
}
| 340 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class AdvSecEnablementStatus(Model):
"""
:param enabled: Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere
:type enabled: bool
:param enabled_changed_on_date: Enabled changed on datetime To Be Removed M223 +
:type enabled_changed_on_date: datetime
:param changed_by_id: Enabled by VSID
:type changed_by_id: str
:param changed_on_date: Enabled changed on datetime
:type changed_on_date: datetime
:param project_id: ProjectId
:type project_id: str
:param repository_id: RepositoryId
:type repository_id: str
"""
_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'enabled_changed_on_date': {'key': 'enabledChangedOnDate', 'type': 'iso-8601'},
'changed_by_id': {'key': 'changedById', 'type': 'str'},
'changed_on_date': {'key': 'changedOnDate', 'type': 'iso-8601'},
'project_id': {'key': 'projectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, enabled=None, enabled_changed_on_date=None, changed_by_id=None, changed_on_date=None, project_id=None, repository_id=None):
super(AdvSecEnablementStatus, self).__init__()
self.enabled = enabled
self.enabled_changed_on_date = enabled_changed_on_date
self.changed_by_id = changed_by_id
self.changed_on_date = changed_on_date
self.project_id = project_id
self.repository_id = repository_id
class AdvSecEnablementUpdate(Model):
"""
:param new_status: New status
:type new_status: bool
:param project_id: ProjectId
:type project_id: str
:param repository_id: RepositoryId Actual RepositoryId to Modify or Magic Repository Id "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" for ALL Repositories for that project
:type repository_id: str
"""
_attribute_map = {
'new_status': {'key': 'newStatus', 'type': 'bool'},
'project_id': {'key': 'projectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, new_status=None, project_id=None, repository_id=None):
super(AdvSecEnablementUpdate, self).__init__()
self.new_status = new_status
self.project_id = project_id
self.repository_id = repository_id
class Attachment(Model):
"""
Meta data for a file attached to an artifact.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: The person that uploaded this attachment.
:type author: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param content_hash: Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function.
:type content_hash: str
:param created_date: The time the attachment was uploaded.
:type created_date: datetime
:param description: The description of the attachment.
:type description: str
:param display_name: The display name of the attachment. Can't be null or empty.
:type display_name: str
:param id: Id of the attachment.
:type id: int
:param properties: Extended properties.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
:param url: The url to download the content of the attachment.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'IdentityRef'},
'content_hash': {'key': 'contentHash', 'type': 'str'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'properties': {'key': 'properties', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, author=None, content_hash=None, created_date=None, description=None, display_name=None, id=None, properties=None, url=None):
super(Attachment, self).__init__()
self._links = _links
self.author = author
self.content_hash = content_hash
self.created_date = created_date
self.description = description
self.display_name = display_name
self.id = id
self.properties = properties
self.url = url
class BillableCommitter(Model):
"""
Used by AdvSec to return billable committers.
:param repo_id: RepositoryId commit was pushed to.
:type repo_id: str
:param vsid: Visual Studio ID /Team Foundation ID
:type vsid: str
"""
_attribute_map = {
'repo_id': {'key': 'repoId', 'type': 'str'},
'vsid': {'key': 'vsid', 'type': 'str'}
}
def __init__(self, repo_id=None, vsid=None):
super(BillableCommitter, self).__init__()
self.repo_id = repo_id
self.vsid = vsid
class BillableCommitterDetail(BillableCommitter):
"""
:param repo_id: RepositoryId commit was pushed to.
:type repo_id: str
:param vsid: Visual Studio ID /Team Foundation ID
:type vsid: str
:param commit_id: ID (SHA-1) of the commit.
:type commit_id: str
:param committer_email: Committer email address after parsing.
:type committer_email: str
:param commit_time: Time reported by the commit.
:type commit_time: datetime
:param project_id: Project Id commit was pushed to.
:type project_id: str
:param project_name: Project name commit was pushed to.
:type project_name: str
:param pushed_time: Time of the push that contained the commit.
:type pushed_time: datetime
:param push_id: Push Id that contained the commit.
:type push_id: int
:param repo_name: Repository name commit was pushed to.
:type repo_name: str
"""
_attribute_map = {
'repo_id': {'key': 'repoId', 'type': 'str'},
'vsid': {'key': 'vsid', 'type': 'str'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'committer_email': {'key': 'committerEmail', 'type': 'str'},
'commit_time': {'key': 'commitTime', 'type': 'iso-8601'},
'project_id': {'key': 'projectId', 'type': 'str'},
'project_name': {'key': 'projectName', 'type': 'str'},
'pushed_time': {'key': 'pushedTime', 'type': 'iso-8601'},
'push_id': {'key': 'pushId', 'type': 'int'},
'repo_name': {'key': 'repoName', 'type': 'str'}
}
def __init__(self, repo_id=None, vsid=None, commit_id=None, committer_email=None, commit_time=None, project_id=None, project_name=None, pushed_time=None, push_id=None, repo_name=None):
super(BillableCommitterDetail, self).__init__(repo_id=repo_id, vsid=vsid)
self.commit_id = commit_id
self.committer_email = committer_email
self.commit_time = commit_time
self.project_id = project_id
self.project_name = project_name
self.pushed_time = pushed_time
self.push_id = push_id
self.repo_name = repo_name
class Comment(Model):
"""
Represents a comment which is one of potentially many in a comment thread.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: The author of the comment.
:type author: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param comment_type: The comment type at the time of creation.
:type comment_type: object
:param content: The comment content.
:type content: str
:param id: The comment ID. IDs start at 1 and are unique to a pull request.
:type id: int
:param is_deleted: Whether or not this comment was soft-deleted.
:type is_deleted: bool
:param last_content_updated_date: The date the comment's content was last updated.
:type last_content_updated_date: datetime
:param last_updated_date: The date the comment was last updated.
:type last_updated_date: datetime
:param parent_comment_id: The ID of the parent comment. This is used for replies.
:type parent_comment_id: int
:param published_date: The date the comment was first published.
:type published_date: datetime
:param users_liked: A list of the users who have liked this comment.
:type users_liked: list of :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'IdentityRef'},
'comment_type': {'key': 'commentType', 'type': 'object'},
'content': {'key': 'content', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'last_content_updated_date': {'key': 'lastContentUpdatedDate', 'type': 'iso-8601'},
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
'parent_comment_id': {'key': 'parentCommentId', 'type': 'int'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'users_liked': {'key': 'usersLiked', 'type': '[IdentityRef]'}
}
def __init__(self, _links=None, author=None, comment_type=None, content=None, id=None, is_deleted=None, last_content_updated_date=None, last_updated_date=None, parent_comment_id=None, published_date=None, users_liked=None):
super(Comment, self).__init__()
self._links = _links
self.author = author
self.comment_type = comment_type
self.content = content
self.id = id
self.is_deleted = is_deleted
self.last_content_updated_date = last_content_updated_date
self.last_updated_date = last_updated_date
self.parent_comment_id = parent_comment_id
self.published_date = published_date
self.users_liked = users_liked
class CommentIterationContext(Model):
"""
Comment iteration context is used to identify which diff was being viewed when the thread was created.
:param first_comparing_iteration: The iteration of the file on the left side of the diff when the thread was created. If this value is equal to SecondComparingIteration, then this version is the common commit between the source and target branches of the pull request.
:type first_comparing_iteration: int
:param second_comparing_iteration: The iteration of the file on the right side of the diff when the thread was created.
:type second_comparing_iteration: int
"""
_attribute_map = {
'first_comparing_iteration': {'key': 'firstComparingIteration', 'type': 'int'},
'second_comparing_iteration': {'key': 'secondComparingIteration', 'type': 'int'}
}
def __init__(self, first_comparing_iteration=None, second_comparing_iteration=None):
super(CommentIterationContext, self).__init__()
self.first_comparing_iteration = first_comparing_iteration
self.second_comparing_iteration = second_comparing_iteration
class CommentPosition(Model):
"""
:param line: The line number of a thread's position. Starts at 1.
:type line: int
:param offset: The character offset of a thread's position inside of a line. Starts at 0.
:type offset: int
"""
_attribute_map = {
'line': {'key': 'line', 'type': 'int'},
'offset': {'key': 'offset', 'type': 'int'}
}
def __init__(self, line=None, offset=None):
super(CommentPosition, self).__init__()
self.line = line
self.offset = offset
class CommentThread(Model):
"""
Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies).
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param comments: A list of the comments.
:type comments: list of :class:`Comment <azure.devops.v7_1.git.models.Comment>`
:param id: The comment thread id.
:type id: int
:param identities: Set of identities related to this thread
:type identities: dict
:param is_deleted: Specify if the thread is deleted which happens when all comments are deleted.
:type is_deleted: bool
:param last_updated_date: The time this thread was last updated.
:type last_updated_date: datetime
:param properties: Optional properties associated with the thread as a collection of key-value pairs.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
:param published_date: The time this thread was published.
:type published_date: datetime
:param status: The status of the comment thread.
:type status: object
:param thread_context: Specify thread context such as position in left/right file.
:type thread_context: :class:`CommentThreadContext <azure.devops.v7_1.git.models.CommentThreadContext>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comments': {'key': 'comments', 'type': '[Comment]'},
'id': {'key': 'id', 'type': 'int'},
'identities': {'key': 'identities', 'type': '{IdentityRef}'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
'properties': {'key': 'properties', 'type': 'object'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'object'},
'thread_context': {'key': 'threadContext', 'type': 'CommentThreadContext'}
}
def __init__(self, _links=None, comments=None, id=None, identities=None, is_deleted=None, last_updated_date=None, properties=None, published_date=None, status=None, thread_context=None):
super(CommentThread, self).__init__()
self._links = _links
self.comments = comments
self.id = id
self.identities = identities
self.is_deleted = is_deleted
self.last_updated_date = last_updated_date
self.properties = properties
self.published_date = published_date
self.status = status
self.thread_context = thread_context
class CommentThreadContext(Model):
"""
:param file_path: File path relative to the root of the repository. It's up to the client to use any path format.
:type file_path: str
:param left_file_end: Position of last character of the thread's span in left file.
:type left_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param left_file_start: Position of first character of the thread's span in left file.
:type left_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param right_file_end: Position of last character of the thread's span in right file.
:type right_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param right_file_start: Position of first character of the thread's span in right file.
:type right_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
"""
_attribute_map = {
'file_path': {'key': 'filePath', 'type': 'str'},
'left_file_end': {'key': 'leftFileEnd', 'type': 'CommentPosition'},
'left_file_start': {'key': 'leftFileStart', 'type': 'CommentPosition'},
'right_file_end': {'key': 'rightFileEnd', 'type': 'CommentPosition'},
'right_file_start': {'key': 'rightFileStart', 'type': 'CommentPosition'}
}
def __init__(self, file_path=None, left_file_end=None, left_file_start=None, right_file_end=None, right_file_start=None):
super(CommentThreadContext, self).__init__()
self.file_path = file_path
self.left_file_end = left_file_end
self.left_file_start = left_file_start
self.right_file_end = right_file_end
self.right_file_start = right_file_start
class CommentTrackingCriteria(Model):
"""
Comment tracking criteria is used to identify which iteration context the thread has been tracked to (if any) along with some detail about the original position and filename.
:param first_comparing_iteration: The iteration of the file on the left side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0.
:type first_comparing_iteration: int
:param orig_file_path: Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration.
:type orig_file_path: str
:param orig_left_file_end: Original position of last character of the thread's span in left file.
:type orig_left_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_left_file_start: Original position of first character of the thread's span in left file.
:type orig_left_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_right_file_end: Original position of last character of the thread's span in right file.
:type orig_right_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_right_file_start: Original position of first character of the thread's span in right file.
:type orig_right_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param second_comparing_iteration: The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0.
:type second_comparing_iteration: int
"""
_attribute_map = {
'first_comparing_iteration': {'key': 'firstComparingIteration', 'type': 'int'},
'orig_file_path': {'key': 'origFilePath', 'type': 'str'},
'orig_left_file_end': {'key': 'origLeftFileEnd', 'type': 'CommentPosition'},
'orig_left_file_start': {'key': 'origLeftFileStart', 'type': 'CommentPosition'},
'orig_right_file_end': {'key': 'origRightFileEnd', 'type': 'CommentPosition'},
'orig_right_file_start': {'key': 'origRightFileStart', 'type': 'CommentPosition'},
'second_comparing_iteration': {'key': 'secondComparingIteration', 'type': 'int'}
}
def __init__(self, first_comparing_iteration=None, orig_file_path=None, orig_left_file_end=None, orig_left_file_start=None, orig_right_file_end=None, orig_right_file_start=None, second_comparing_iteration=None):
super(CommentTrackingCriteria, self).__init__()
self.first_comparing_iteration = first_comparing_iteration
self.orig_file_path = orig_file_path
self.orig_left_file_end = orig_left_file_end
self.orig_left_file_start = orig_left_file_start
self.orig_right_file_end = orig_right_file_end
self.orig_right_file_start = orig_right_file_start
self.second_comparing_iteration = second_comparing_iteration
class FileContentMetadata(Model):
"""
:param content_type:
:type content_type: str
:param encoding:
:type encoding: int
:param extension:
:type extension: str
:param file_name:
:type file_name: str
:param is_binary:
:type is_binary: bool
:param is_image:
:type is_image: bool
:param vs_link:
:type vs_link: str
"""
_attribute_map = {
'content_type': {'key': 'contentType', 'type': 'str'},
'encoding': {'key': 'encoding', 'type': 'int'},
'extension': {'key': 'extension', 'type': 'str'},
'file_name': {'key': 'fileName', 'type': 'str'},
'is_binary': {'key': 'isBinary', 'type': 'bool'},
'is_image': {'key': 'isImage', 'type': 'bool'},
'vs_link': {'key': 'vsLink', 'type': 'str'}
}
def __init__(self, content_type=None, encoding=None, extension=None, file_name=None, is_binary=None, is_image=None, vs_link=None):
super(FileContentMetadata, self).__init__()
self.content_type = content_type
self.encoding = encoding
self.extension = extension
self.file_name = file_name
self.is_binary = is_binary
self.is_image = is_image
self.vs_link = vs_link
class FileDiff(Model):
"""
Provides properties that describe file differences
:param line_diff_blocks: The collection of line diff blocks
:type line_diff_blocks: list of :class:`LineDiffBlock <azure.devops.v7_1.git.models.LineDiffBlock>`
:param original_path: Original path of item if different from current path.
:type original_path: str
:param path: Current path of item
:type path: str
"""
_attribute_map = {
'line_diff_blocks': {'key': 'lineDiffBlocks', 'type': '[LineDiffBlock]'},
'original_path': {'key': 'originalPath', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'}
}
def __init__(self, line_diff_blocks=None, original_path=None, path=None):
super(FileDiff, self).__init__()
self.line_diff_blocks = line_diff_blocks
self.original_path = original_path
self.path = path
class FileDiffParams(Model):
"""
Provides parameters that describe inputs for the file diff
:param original_path: Original path of the file
:type original_path: str
:param path: Current path of the file
:type path: str
"""
_attribute_map = {
'original_path': {'key': 'originalPath', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'}
}
def __init__(self, original_path=None, path=None):
super(FileDiffParams, self).__init__()
self.original_path = original_path
self.path = path
class FileDiffsCriteria(Model):
"""
Provides properties that describe inputs for the file diffs
:param base_version_commit: Commit ID of the base version
:type base_version_commit: str
:param file_diff_params: List of parameters for each of the files for which we need to get the file diff
:type file_diff_params: list of :class:`FileDiffParams <azure.devops.v7_1.git.models.FileDiffParams>`
:param target_version_commit: Commit ID of the target version
:type target_version_commit: str
"""
_attribute_map = {
'base_version_commit': {'key': 'baseVersionCommit', 'type': 'str'},
'file_diff_params': {'key': 'fileDiffParams', 'type': '[FileDiffParams]'},
'target_version_commit': {'key': 'targetVersionCommit', 'type': 'str'}
}
def __init__(self, base_version_commit=None, file_diff_params=None, target_version_commit=None):
super(FileDiffsCriteria, self).__init__()
self.base_version_commit = base_version_commit
self.file_diff_params = file_diff_params
self.target_version_commit = target_version_commit
class GitAnnotatedTag(Model):
"""
A Git annotated tag.
:param message: The tagging Message
:type message: str
:param name: The name of the annotated tag.
:type name: str
:param object_id: The objectId (Sha1Id) of the tag.
:type object_id: str
:param tagged_by: User info and date of tagging.
:type tagged_by: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param tagged_object: Tagged git object.
:type tagged_object: :class:`GitObject <azure.devops.v7_1.git.models.GitObject>`
:param url:
:type url: str
"""
_attribute_map = {
'message': {'key': 'message', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'tagged_by': {'key': 'taggedBy', 'type': 'GitUserDate'},
'tagged_object': {'key': 'taggedObject', 'type': 'GitObject'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, message=None, name=None, object_id=None, tagged_by=None, tagged_object=None, url=None):
super(GitAnnotatedTag, self).__init__()
self.message = message
self.name = name
self.object_id = object_id
self.tagged_by = tagged_by
self.tagged_object = tagged_object
self.url = url
class GitAsyncRefOperation(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status:
:type detailed_status: :class:`GitAsyncRefOperationDetail <azure.devops.v7_1.git.models.GitAsyncRefOperationDetail>`
:param parameters:
:type parameters: :class:`GitAsyncRefOperationParameters <azure.devops.v7_1.git.models.GitAsyncRefOperationParameters>`
:param status:
:type status: object
:param url: A URL that can be used to make further requests for status about the operation
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'},
'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'},
'status': {'key': 'status', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None):
super(GitAsyncRefOperation, self).__init__()
self._links = _links
self.detailed_status = detailed_status
self.parameters = parameters
self.status = status
self.url = url
class GitAsyncRefOperationDetail(Model):
"""
Information about the progress of a cherry pick or revert operation.
:param conflict: Indicates if there was a conflict generated when trying to cherry pick or revert the changes.
:type conflict: bool
:param current_commit_id: The current commit from the list of commits that are being cherry picked or reverted.
:type current_commit_id: str
:param failure_message: Detailed information about why the cherry pick or revert failed to complete.
:type failure_message: str
:param progress: A number between 0 and 1 indicating the percent complete of the operation.
:type progress: float
:param status: Provides a status code that indicates the reason the cherry pick or revert failed.
:type status: object
:param timedout: Indicates if the operation went beyond the maximum time allowed for a cherry pick or revert operation.
:type timedout: bool
"""
_attribute_map = {
'conflict': {'key': 'conflict', 'type': 'bool'},
'current_commit_id': {'key': 'currentCommitId', 'type': 'str'},
'failure_message': {'key': 'failureMessage', 'type': 'str'},
'progress': {'key': 'progress', 'type': 'float'},
'status': {'key': 'status', 'type': 'object'},
'timedout': {'key': 'timedout', 'type': 'bool'}
}
def __init__(self, conflict=None, current_commit_id=None, failure_message=None, progress=None, status=None, timedout=None):
super(GitAsyncRefOperationDetail, self).__init__()
self.conflict = conflict
self.current_commit_id = current_commit_id
self.failure_message = failure_message
self.progress = progress
self.status = status
self.timedout = timedout
class GitAsyncRefOperationParameters(Model):
"""
Parameters that are provided in the request body when requesting to cherry pick or revert.
:param generated_ref_name: Proposed target branch name for the cherry pick or revert operation.
:type generated_ref_name: str
:param onto_ref_name: The target branch for the cherry pick or revert operation.
:type onto_ref_name: str
:param repository: The git repository for the cherry pick or revert operation.
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
:param source: Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit).
:type source: :class:`GitAsyncRefOperationSource <azure.devops.v7_1.git.models.GitAsyncRefOperationSource>`
"""
_attribute_map = {
'generated_ref_name': {'key': 'generatedRefName', 'type': 'str'},
'onto_ref_name': {'key': 'ontoRefName', 'type': 'str'},
'repository': {'key': 'repository', 'type': 'GitRepository'},
'source': {'key': 'source', 'type': 'GitAsyncRefOperationSource'}
}
def __init__(self, generated_ref_name=None, onto_ref_name=None, repository=None, source=None):
super(GitAsyncRefOperationParameters, self).__init__()
self.generated_ref_name = generated_ref_name
self.onto_ref_name = onto_ref_name
self.repository = repository
self.source = source
class GitAsyncRefOperationSource(Model):
"""
GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request. Only one should be provided.
:param commit_list: A list of commits to cherry pick or revert
:type commit_list: list of :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param pull_request_id: Id of the pull request to cherry pick or revert
:type pull_request_id: int
"""
_attribute_map = {
'commit_list': {'key': 'commitList', 'type': '[GitCommitRef]'},
'pull_request_id': {'key': 'pullRequestId', 'type': 'int'}
}
def __init__(self, commit_list=None, pull_request_id=None):
super(GitAsyncRefOperationSource, self).__init__()
self.commit_list = commit_list
self.pull_request_id = pull_request_id
class GitBlobRef(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param object_id: SHA1 hash of git object
:type object_id: str
:param size: Size of blob content (in bytes)
:type size: long
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'object_id': {'key': 'objectId', 'type': 'str'},
'size': {'key': 'size', 'type': 'long'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, object_id=None, size=None, url=None):
super(GitBlobRef, self).__init__()
self._links = _links
self.object_id = object_id
self.size = size
self.url = url
class GitBranchStats(Model):
"""
Ahead and behind counts for a particular ref.
:param ahead_count: Number of commits ahead.
:type ahead_count: int
:param behind_count: Number of commits behind.
:type behind_count: int
:param commit: Current commit.
:type commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param is_base_version: True if this is the result for the base version.
:type is_base_version: bool
:param name: Name of the ref.
:type name: str
"""
_attribute_map = {
'ahead_count': {'key': 'aheadCount', 'type': 'int'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'commit': {'key': 'commit', 'type': 'GitCommitRef'},
'is_base_version': {'key': 'isBaseVersion', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, ahead_count=None, behind_count=None, commit=None, is_base_version=None, name=None):
super(GitBranchStats, self).__init__()
self.ahead_count = ahead_count
self.behind_count = behind_count
self.commit = commit
self.is_base_version = is_base_version
self.name = name
class GitCommitDiffs(Model):
"""
:param ahead_count:
:type ahead_count: int
:param all_changes_included:
:type all_changes_included: bool
:param base_commit:
:type base_commit: str
:param behind_count:
:type behind_count: int
:param common_commit:
:type common_commit: str
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
:param target_commit:
:type target_commit: str
"""
_attribute_map = {
'ahead_count': {'key': 'aheadCount', 'type': 'int'},
'all_changes_included': {'key': 'allChangesIncluded', 'type': 'bool'},
'base_commit': {'key': 'baseCommit', 'type': 'str'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'common_commit': {'key': 'commonCommit', 'type': 'str'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[object]'},
'target_commit': {'key': 'targetCommit', 'type': 'str'}
}
def __init__(self, ahead_count=None, all_changes_included=None, base_commit=None, behind_count=None, common_commit=None, change_counts=None, changes=None, target_commit=None):
super(GitCommitDiffs, self).__init__()
self.ahead_count = ahead_count
self.all_changes_included = all_changes_included
self.base_commit = base_commit
self.behind_count = behind_count
self.common_commit = common_commit
self.change_counts = change_counts
self.changes = changes
self.target_commit = target_commit
class GitCommitChanges(Model):
"""
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
"""
_attribute_map = {
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[object]'}
}
def __init__(self, change_counts=None, changes=None):
super(GitCommitChanges, self).__init__()
self.change_counts = change_counts
self.changes = changes
class GitCommitRef(Model):
"""
Provides properties that describe a Git commit and associated metadata.
:param _links: A collection of related REST reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: Author of the commit.
:type author: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param comment: Comment or message of the commit.
:type comment: str
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
:type comment_truncated: bool
:param commit_id: ID (SHA-1) of the commit.
:type commit_id: str
:param committer: Committer of the commit.
:type committer: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param commit_too_many_changes: Indicates that commit contains too many changes to be displayed
:type commit_too_many_changes: bool
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
:type change_counts: dict
:param changes: An enumeration of the changes included with the commit.
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
:param parents: An enumeration of the parent commit IDs for this commit.
:type parents: list of str
:param push: The push associated with this commit.
:type push: :class:`GitPushRef <azure.devops.v7_1.git.models.GitPushRef>`
:param remote_url: Remote URL path to the commit.
:type remote_url: str
:param statuses: A list of status metadata from services and extensions that may associate additional information to the commit.
:type statuses: list of :class:`GitStatus <azure.devops.v7_1.git.models.GitStatus>`
:param url: REST URL for this resource.
:type url: str
:param work_items: A list of workitems associated with this commit.
:type work_items: list of :class:`ResourceRef <azure.devops.v7_1.git.models.ResourceRef>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'committer': {'key': 'committer', 'type': 'GitUserDate'},
'commit_too_many_changes': {'key': 'commitTooManyChanges', 'type': 'bool'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[object]'},
'parents': {'key': 'parents', 'type': '[str]'},
'push': {'key': 'push', 'type': 'GitPushRef'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'statuses': {'key': 'statuses', 'type': '[GitStatus]'},
'url': {'key': 'url', 'type': 'str'},
'work_items': {'key': 'workItems', 'type': '[ResourceRef]'}
}
def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, commit_id=None, committer=None, commit_too_many_changes=None, change_counts=None, changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None):
super(GitCommitRef, self).__init__()
self._links = _links
self.author = author
self.comment = comment
self.comment_truncated = comment_truncated
self.commit_id = commit_id
self.committer = committer
self.commit_too_many_changes = commit_too_many_changes
self.change_counts = change_counts
self.changes = changes
self.parents = parents
self.push = push
self.remote_url = remote_url
self.statuses = statuses
self.url = url
self.work_items = work_items
class GitConflict(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param conflict_id:
:type conflict_id: int
:param conflict_path:
:type conflict_path: str
:param conflict_type:
:type conflict_type: object
:param merge_base_commit:
:type merge_base_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param merge_origin:
:type merge_origin: :class:`GitMergeOriginRef <azure.devops.v7_1.git.models.GitMergeOriginRef>`
:param merge_source_commit:
:type merge_source_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param merge_target_commit:
:type merge_target_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param resolution_error:
:type resolution_error: object
:param resolution_status:
:type resolution_status: object
:param resolved_by:
:type resolved_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param resolved_date:
:type resolved_date: datetime
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'conflict_id': {'key': 'conflictId', 'type': 'int'},
'conflict_path': {'key': 'conflictPath', 'type': 'str'},
'conflict_type': {'key': 'conflictType', 'type': 'object'},
'merge_base_commit': {'key': 'mergeBaseCommit', 'type': 'GitCommitRef'},
'merge_origin': {'key': 'mergeOrigin', 'type': 'GitMergeOriginRef'},
'merge_source_commit': {'key': 'mergeSourceCommit', 'type': 'GitCommitRef'},
'merge_target_commit': {'key': 'mergeTargetCommit', 'type': 'GitCommitRef'},
'resolution_error': {'key': 'resolutionError', 'type': 'object'},
'resolution_status': {'key': 'resolutionStatus', 'type': 'object'},
'resolved_by': {'key': 'resolvedBy', 'type': 'IdentityRef'},
'resolved_date': {'key': 'resolvedDate', 'type': 'iso-8601'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, conflict_id=None, conflict_path=None, conflict_type=None, merge_base_commit=None, merge_origin=None, merge_source_commit=None, merge_target_commit=None, resolution_error=None, resolution_status=None, resolved_by=None, resolved_date=None, url=None):
super(GitConflict, self).__init__()
self._links = _links
self.conflict_id = conflict_id
self.conflict_path = conflict_path
self.conflict_type = conflict_type
self.merge_base_commit = merge_base_commit
self.merge_origin = merge_origin
self.merge_source_commit = merge_source_commit
self.merge_target_commit = merge_target_commit
self.resolution_error = resolution_error
self.resolution_status = resolution_status
self.resolved_by = resolved_by
self.resolved_date = resolved_date
self.url = url
class GitConflictUpdateResult(Model):
"""
:param conflict_id: Conflict ID that was provided by input
:type conflict_id: int
:param custom_message: Reason for failing
:type custom_message: str
:param updated_conflict: New state of the conflict after updating
:type updated_conflict: :class:`GitConflict <azure.devops.v7_1.git.models.GitConflict>`
:param update_status: Status of the update on the server
:type update_status: object
"""
_attribute_map = {
'conflict_id': {'key': 'conflictId', 'type': 'int'},
'custom_message': {'key': 'customMessage', 'type': 'str'},
'updated_conflict': {'key': 'updatedConflict', 'type': 'GitConflict'},
'update_status': {'key': 'updateStatus', 'type': 'object'}
}
def __init__(self, conflict_id=None, custom_message=None, updated_conflict=None, update_status=None):
super(GitConflictUpdateResult, self).__init__()
self.conflict_id = conflict_id
self.custom_message = custom_message
self.updated_conflict = updated_conflict
self.update_status = update_status
class GitDeletedRepository(Model):
"""
:param created_date:
:type created_date: datetime
:param deleted_by:
:type deleted_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param deleted_date:
:type deleted_date: datetime
:param id:
:type id: str
:param name:
:type name: str
:param project:
:type project: :class:`TeamProjectReference <azure.devops.v7_1.git.models.TeamProjectReference>`
"""
_attribute_map = {
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'deleted_by': {'key': 'deletedBy', 'type': 'IdentityRef'},
'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'project': {'key': 'project', 'type': 'TeamProjectReference'}
}
def __init__(self, created_date=None, deleted_by=None, deleted_date=None, id=None, name=None, project=None):
super(GitDeletedRepository, self).__init__()
self.created_date = created_date
self.deleted_by = deleted_by
self.deleted_date = deleted_date
self.id = id
self.name = name
self.project = project
class GitFilePathsCollection(Model):
"""
:param commit_id:
:type commit_id: str
:param paths:
:type paths: list of str
:param url:
:type url: str
"""
_attribute_map = {
'commit_id': {'key': 'commitId', 'type': 'str'},
'paths': {'key': 'paths', 'type': '[str]'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, commit_id=None, paths=None, url=None):
super(GitFilePathsCollection, self).__init__()
self.commit_id = commit_id
self.paths = paths
self.url = url
class GitForkOperationStatusDetail(Model):
"""
Status information about a requested fork operation.
:param all_steps: All valid steps for the forking process
:type all_steps: list of str
:param current_step: Index into AllSteps for the current step
:type current_step: int
:param error_message: Error message if the operation failed.
:type error_message: str
"""
_attribute_map = {
'all_steps': {'key': 'allSteps', 'type': '[str]'},
'current_step': {'key': 'currentStep', 'type': 'int'},
'error_message': {'key': 'errorMessage', 'type': 'str'}
}
def __init__(self, all_steps=None, current_step=None, error_message=None):
super(GitForkOperationStatusDetail, self).__init__()
self.all_steps = all_steps
self.current_step = current_step
self.error_message = error_message
class GitForkSyncRequest(Model):
"""
Request to sync data between two forks.
:param _links: Collection of related links
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status:
:type detailed_status: :class:`GitForkOperationStatusDetail <azure.devops.v7_1.git.models.GitForkOperationStatusDetail>`
:param operation_id: Unique identifier for the operation.
:type operation_id: int
:param source: Fully-qualified identifier for the source repository.
:type source: :class:`GlobalGitRepositoryKey <azure.devops.v7_1.git.models.GlobalGitRepositoryKey>`
:param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized.
:type source_to_target_refs: list of :class:`SourceToTargetRef <azure.devops.v7_1.git.models.SourceToTargetRef>`
:param status:
:type status: object
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitForkOperationStatusDetail'},
'operation_id': {'key': 'operationId', 'type': 'int'},
'source': {'key': 'source', 'type': 'GlobalGitRepositoryKey'},
'source_to_target_refs': {'key': 'sourceToTargetRefs', 'type': '[SourceToTargetRef]'},
'status': {'key': 'status', 'type': 'object'}
}
def __init__(self, _links=None, detailed_status=None, operation_id=None, source=None, source_to_target_refs=None, status=None):
super(GitForkSyncRequest, self).__init__()
self._links = _links
self.detailed_status = detailed_status
self.operation_id = operation_id
self.source = source
self.source_to_target_refs = source_to_target_refs
self.status = status
class GitForkSyncRequestParameters(Model):
"""
Parameters for creating a fork request
:param source: Fully-qualified identifier for the source repository.
:type source: :class:`GlobalGitRepositoryKey <azure.devops.v7_1.git.models.GlobalGitRepositoryKey>`
:param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized.
:type source_to_target_refs: list of :class:`SourceToTargetRef <azure.devops.v7_1.git.models.SourceToTargetRef>`
"""
_attribute_map = {
'source': {'key': 'source', 'type': 'GlobalGitRepositoryKey'},
'source_to_target_refs': {'key': 'sourceToTargetRefs', 'type': '[SourceToTargetRef]'}
}
def __init__(self, source=None, source_to_target_refs=None):
super(GitForkSyncRequestParameters, self).__init__()
self.source = source
self.source_to_target_refs = source_to_target_refs
class GitCherryPick(GitAsyncRefOperation):
"""
This object is returned from Cherry Pick operations and provides the id and status of the operation
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status:
:type detailed_status: :class:`GitAsyncRefOperationDetail <azure.devops.v7_1.git.models.GitAsyncRefOperationDetail>`
:param parameters:
:type parameters: :class:`GitAsyncRefOperationParameters <azure.devops.v7_1.git.models.GitAsyncRefOperationParameters>`
:param status:
:type status: object
:param url: A URL that can be used to make further requests for status about the operation
:type url: str
:param cherry_pick_id:
:type cherry_pick_id: int
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'},
'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'},
'status': {'key': 'status', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'},
'cherry_pick_id': {'key': 'cherryPickId', 'type': 'int'}
}
def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None, cherry_pick_id=None):
super(GitCherryPick, self).__init__(_links=_links, detailed_status=detailed_status, parameters=parameters, status=status, url=url)
self.cherry_pick_id = cherry_pick_id
class GitImportGitSource(Model):
"""
Parameter for creating a git import request when source is Git version control
:param overwrite: Tells if this is a sync request or not
:type overwrite: bool
:param url: Url for the source repo
:type url: str
"""
_attribute_map = {
'overwrite': {'key': 'overwrite', 'type': 'bool'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, overwrite=None, url=None):
super(GitImportGitSource, self).__init__()
self.overwrite = overwrite
self.url = url
class GitImportRequest(Model):
"""
A request to import data from a remote source control system.
:param _links: Links to related resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status: Detailed status of the import, including the current step and an error message, if applicable.
:type detailed_status: :class:`GitImportStatusDetail <azure.devops.v7_1.git.models.GitImportStatusDetail>`
:param import_request_id: The unique identifier for this import request.
:type import_request_id: int
:param parameters: Parameters for creating the import request.
:type parameters: :class:`GitImportRequestParameters <azure.devops.v7_1.git.models.GitImportRequestParameters>`
:param repository: The target repository for this import.
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
:param status: Current status of the import.
:type status: object
:param url: A link back to this import request resource.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitImportStatusDetail'},
'import_request_id': {'key': 'importRequestId', 'type': 'int'},
'parameters': {'key': 'parameters', 'type': 'GitImportRequestParameters'},
'repository': {'key': 'repository', 'type': 'GitRepository'},
'status': {'key': 'status', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, detailed_status=None, import_request_id=None, parameters=None, repository=None, status=None, url=None):
super(GitImportRequest, self).__init__()
self._links = _links
self.detailed_status = detailed_status
self.import_request_id = import_request_id
self.parameters = parameters
self.repository = repository
self.status = status
self.url = url
class GitImportRequestParameters(Model):
"""
Parameters for creating an import request
:param delete_service_endpoint_after_import_is_done: Option to delete service endpoint when import is done
:type delete_service_endpoint_after_import_is_done: bool
:param git_source: Source for importing git repository
:type git_source: :class:`GitImportGitSource <azure.devops.v7_1.git.models.GitImportGitSource>`
:param service_endpoint_id: Service Endpoint for connection to external endpoint
:type service_endpoint_id: str
:param tfvc_source: Source for importing tfvc repository
:type tfvc_source: :class:`GitImportTfvcSource <azure.devops.v7_1.git.models.GitImportTfvcSource>`
"""
_attribute_map = {
'delete_service_endpoint_after_import_is_done': {'key': 'deleteServiceEndpointAfterImportIsDone', 'type': 'bool'},
'git_source': {'key': 'gitSource', 'type': 'GitImportGitSource'},
'service_endpoint_id': {'key': 'serviceEndpointId', 'type': 'str'},
'tfvc_source': {'key': 'tfvcSource', 'type': 'GitImportTfvcSource'}
}
def __init__(self, delete_service_endpoint_after_import_is_done=None, git_source=None, service_endpoint_id=None, tfvc_source=None):
super(GitImportRequestParameters, self).__init__()
self.delete_service_endpoint_after_import_is_done = delete_service_endpoint_after_import_is_done
self.git_source = git_source
self.service_endpoint_id = service_endpoint_id
self.tfvc_source = tfvc_source
class GitImportStatusDetail(Model):
"""
Additional status information about an import request.
:param all_steps: All valid steps for the import process
:type all_steps: list of str
:param current_step: Index into AllSteps for the current step
:type current_step: int
:param error_message: Error message if the operation failed.
:type error_message: str
"""
_attribute_map = {
'all_steps': {'key': 'allSteps', 'type': '[str]'},
'current_step': {'key': 'currentStep', 'type': 'int'},
'error_message': {'key': 'errorMessage', 'type': 'str'}
}
def __init__(self, all_steps=None, current_step=None, error_message=None):
super(GitImportStatusDetail, self).__init__()
self.all_steps = all_steps
self.current_step = current_step
self.error_message = error_message
class GitImportTfvcSource(Model):
"""
Parameter for creating a git import request when source is tfvc version control
:param import_history: Set true to import History, false otherwise
:type import_history: bool
:param import_history_duration_in_days: Get history for last n days (max allowed value is 180 days)
:type import_history_duration_in_days: int
:param path: Path which we want to import (this can be copied from Path Control in Explorer)
:type path: str
"""
_attribute_map = {
'import_history': {'key': 'importHistory', 'type': 'bool'},
'import_history_duration_in_days': {'key': 'importHistoryDurationInDays', 'type': 'int'},
'path': {'key': 'path', 'type': 'str'}
}
def __init__(self, import_history=None, import_history_duration_in_days=None, path=None):
super(GitImportTfvcSource, self).__init__()
self.import_history = import_history
self.import_history_duration_in_days = import_history_duration_in_days
self.path = path
class GitItemDescriptor(Model):
"""
:param path: Path to item
:type path: str
:param recursion_level: Specifies whether to include children (OneLevel), all descendants (Full), or None
:type recursion_level: object
:param version: Version string (interpretation based on VersionType defined in subclass
:type version: str
:param version_options: Version modifiers (e.g. previous)
:type version_options: object
:param version_type: How to interpret version (branch,tag,commit)
:type version_type: object
"""
_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'recursion_level': {'key': 'recursionLevel', 'type': 'object'},
'version': {'key': 'version', 'type': 'str'},
'version_options': {'key': 'versionOptions', 'type': 'object'},
'version_type': {'key': 'versionType', 'type': 'object'}
}
def __init__(self, path=None, recursion_level=None, version=None, version_options=None, version_type=None):
super(GitItemDescriptor, self).__init__()
self.path = path
self.recursion_level = recursion_level
self.version = version
self.version_options = version_options
self.version_type = version_type
class GitItemRequestData(Model):
"""
:param include_content_metadata: Whether to include metadata for all items
:type include_content_metadata: bool
:param include_links: Whether to include the _links field on the shallow references
:type include_links: bool
:param item_descriptors: Collection of items to fetch, including path, version, and recursion level
:type item_descriptors: list of :class:`GitItemDescriptor <azure.devops.v7_1.git.models.GitItemDescriptor>`
:param latest_processed_change: Whether to include shallow ref to commit that last changed each item
:type latest_processed_change: bool
"""
_attribute_map = {
'include_content_metadata': {'key': 'includeContentMetadata', 'type': 'bool'},
'include_links': {'key': 'includeLinks', 'type': 'bool'},
'item_descriptors': {'key': 'itemDescriptors', 'type': '[GitItemDescriptor]'},
'latest_processed_change': {'key': 'latestProcessedChange', 'type': 'bool'}
}
def __init__(self, include_content_metadata=None, include_links=None, item_descriptors=None, latest_processed_change=None):
super(GitItemRequestData, self).__init__()
self.include_content_metadata = include_content_metadata
self.include_links = include_links
self.item_descriptors = item_descriptors
self.latest_processed_change = latest_processed_change
class GitMergeOperationStatusDetail(Model):
"""
Status information about a requested merge operation.
:param failure_message: Error message if the operation failed.
:type failure_message: str
:param merge_commit_id: The commitId of the resultant merge commit.
:type merge_commit_id: str
"""
_attribute_map = {
'failure_message': {'key': 'failureMessage', 'type': 'str'},
'merge_commit_id': {'key': 'mergeCommitId', 'type': 'str'}
}
def __init__(self, failure_message=None, merge_commit_id=None):
super(GitMergeOperationStatusDetail, self).__init__()
self.failure_message = failure_message
self.merge_commit_id = merge_commit_id
class GitMergeOriginRef(Model):
"""
:param cherry_pick_id:
:type cherry_pick_id: int
:param pull_request_id:
:type pull_request_id: int
:param revert_id:
:type revert_id: int
"""
_attribute_map = {
'cherry_pick_id': {'key': 'cherryPickId', 'type': 'int'},
'pull_request_id': {'key': 'pullRequestId', 'type': 'int'},
'revert_id': {'key': 'revertId', 'type': 'int'}
}
def __init__(self, cherry_pick_id=None, pull_request_id=None, revert_id=None):
super(GitMergeOriginRef, self).__init__()
self.cherry_pick_id = cherry_pick_id
self.pull_request_id = pull_request_id
self.revert_id = revert_id
class GitMergeParameters(Model):
"""
Parameters required for performing git merge.
:param comment: Comment or message of the commit.
:type comment: str
:param parents: An enumeration of the parent commit IDs for the merge commit.
:type parents: list of str
"""
_attribute_map = {
'comment': {'key': 'comment', 'type': 'str'},
'parents': {'key': 'parents', 'type': '[str]'}
}
def __init__(self, comment=None, parents=None):
super(GitMergeParameters, self).__init__()
self.comment = comment
self.parents = parents
class GitObject(Model):
"""
Git object identifier and type information.
:param object_id: Object Id (Sha1Id).
:type object_id: str
:param object_type: Type of object (Commit, Tree, Blob, Tag)
:type object_type: object
"""
_attribute_map = {
'object_id': {'key': 'objectId', 'type': 'str'},
'object_type': {'key': 'objectType', 'type': 'object'}
}
def __init__(self, object_id=None, object_type=None):
super(GitObject, self).__init__()
self.object_id = object_id
self.object_type = object_type
class GitPolicyConfigurationResponse(Model):
"""
:param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field.
:type continuation_token: str
:param policy_configurations:
:type policy_configurations: list of :class:`PolicyConfiguration <azure.devops.v7_1.git.models.PolicyConfiguration>`
"""
_attribute_map = {
'continuation_token': {'key': 'continuationToken', 'type': 'str'},
'policy_configurations': {'key': 'policyConfigurations', 'type': '[PolicyConfiguration]'}
}
def __init__(self, continuation_token=None, policy_configurations=None):
super(GitPolicyConfigurationResponse, self).__init__()
self.continuation_token = continuation_token
self.policy_configurations = policy_configurations
class GitPullRequest(Model):
"""
Represents all the data associated with a pull request.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param artifact_id: A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: ```vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}```
:type artifact_id: str
:param auto_complete_set_by: If set, auto-complete is enabled for this pull request and this is the identity that enabled it.
:type auto_complete_set_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param closed_by: The user who closed the pull request.
:type closed_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param closed_date: The date when the pull request was closed (completed, abandoned, or merged externally).
:type closed_date: datetime
:param code_review_id: The code review ID of the pull request. Used internally.
:type code_review_id: int
:param commits: The commits contained in the pull request.
:type commits: list of :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param completion_options: Options which affect how the pull request will be merged when it is completed.
:type completion_options: :class:`GitPullRequestCompletionOptions <azure.devops.v7_1.git.models.GitPullRequestCompletionOptions>`
:param completion_queue_time: The most recent date at which the pull request entered the queue to be completed. Used internally.
:type completion_queue_time: datetime
:param created_by: The identity of the user who created the pull request.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param creation_date: The date when the pull request was created.
:type creation_date: datetime
:param description: The description of the pull request.
:type description: str
:param fork_source: If this is a PR from a fork this will contain information about its source.
:type fork_source: :class:`GitForkRef <azure.devops.v7_1.git.models.GitForkRef>`
:param has_multiple_merge_bases: Multiple mergebases warning
:type has_multiple_merge_bases: bool
:param is_draft: Draft / WIP pull request.
:type is_draft: bool
:param labels: The labels associated with the pull request.
:type labels: list of :class:`WebApiTagDefinition <azure.devops.v7_1.git.models.WebApiTagDefinition>`
:param last_merge_commit: The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful.
:type last_merge_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param last_merge_source_commit: The commit at the head of the source branch at the time of the last pull request merge.
:type last_merge_source_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param last_merge_target_commit: The commit at the head of the target branch at the time of the last pull request merge.
:type last_merge_target_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param merge_failure_message: If set, pull request merge failed for this reason.
:type merge_failure_message: str
:param merge_failure_type: The type of failure (if any) of the pull request merge.
:type merge_failure_type: object
:param merge_id: The ID of the job used to run the pull request merge. Used internally.
:type merge_id: str
:param merge_options: Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes.
:type merge_options: :class:`GitPullRequestMergeOptions <azure.devops.v7_1.git.models.GitPullRequestMergeOptions>`
:param merge_status: The current status of the pull request merge.
:type merge_status: object
:param pull_request_id: The ID of the pull request.
:type pull_request_id: int
:param remote_url: Used internally.
:type remote_url: str
:param repository: The repository containing the target branch of the pull request.
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
:param reviewers: A list of reviewers on the pull request along with the state of their votes.
:type reviewers: list of :class:`IdentityRefWithVote <azure.devops.v7_1.git.models.IdentityRefWithVote>`
:param source_ref_name: The name of the source branch of the pull request.
:type source_ref_name: str
:param status: The status of the pull request.
:type status: object
:param supports_iterations: If true, this pull request supports multiple iterations. Iteration support means individual pushes to the source branch of the pull request can be reviewed and comments left in one iteration will be tracked across future iterations.
:type supports_iterations: bool
:param target_ref_name: The name of the target branch of the pull request.
:type target_ref_name: str
:param title: The title of the pull request.
:type title: str
:param url: Used internally.
:type url: str
:param work_item_refs: Any work item references associated with this pull request.
:type work_item_refs: list of :class:`ResourceRef <azure.devops.v7_1.git.models.ResourceRef>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'auto_complete_set_by': {'key': 'autoCompleteSetBy', 'type': 'IdentityRef'},
'closed_by': {'key': 'closedBy', 'type': 'IdentityRef'},
'closed_date': {'key': 'closedDate', 'type': 'iso-8601'},
'code_review_id': {'key': 'codeReviewId', 'type': 'int'},
'commits': {'key': 'commits', 'type': '[GitCommitRef]'},
'completion_options': {'key': 'completionOptions', 'type': 'GitPullRequestCompletionOptions'},
'completion_queue_time': {'key': 'completionQueueTime', 'type': 'iso-8601'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'creation_date': {'key': 'creationDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'fork_source': {'key': 'forkSource', 'type': 'GitForkRef'},
'has_multiple_merge_bases': {'key': 'hasMultipleMergeBases', 'type': 'bool'},
'is_draft': {'key': 'isDraft', 'type': 'bool'},
'labels': {'key': 'labels', 'type': '[WebApiTagDefinition]'},
'last_merge_commit': {'key': 'lastMergeCommit', 'type': 'GitCommitRef'},
'last_merge_source_commit': {'key': 'lastMergeSourceCommit', 'type': 'GitCommitRef'},
'last_merge_target_commit': {'key': 'lastMergeTargetCommit', 'type': 'GitCommitRef'},
'merge_failure_message': {'key': 'mergeFailureMessage', 'type': 'str'},
'merge_failure_type': {'key': 'mergeFailureType', 'type': 'object'},
'merge_id': {'key': 'mergeId', 'type': 'str'},
'merge_options': {'key': 'mergeOptions', 'type': 'GitPullRequestMergeOptions'},
'merge_status': {'key': 'mergeStatus', 'type': 'object'},
'pull_request_id': {'key': 'pullRequestId', 'type': 'int'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'repository': {'key': 'repository', 'type': 'GitRepository'},
'reviewers': {'key': 'reviewers', 'type': '[IdentityRefWithVote]'},
'source_ref_name': {'key': 'sourceRefName', 'type': 'str'},
'status': {'key': 'status', 'type': 'object'},
'supports_iterations': {'key': 'supportsIterations', 'type': 'bool'},
'target_ref_name': {'key': 'targetRefName', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'work_item_refs': {'key': 'workItemRefs', 'type': '[ResourceRef]'}
}
def __init__(self, _links=None, artifact_id=None, auto_complete_set_by=None, closed_by=None, closed_date=None, code_review_id=None, commits=None, completion_options=None, completion_queue_time=None, created_by=None, creation_date=None, description=None, fork_source=None, has_multiple_merge_bases=None, is_draft=None, labels=None, last_merge_commit=None, last_merge_source_commit=None, last_merge_target_commit=None, merge_failure_message=None, merge_failure_type=None, merge_id=None, merge_options=None, merge_status=None, pull_request_id=None, remote_url=None, repository=None, reviewers=None, source_ref_name=None, status=None, supports_iterations=None, target_ref_name=None, title=None, url=None, work_item_refs=None):
super(GitPullRequest, self).__init__()
self._links = _links
self.artifact_id = artifact_id
self.auto_complete_set_by = auto_complete_set_by
self.closed_by = closed_by
self.closed_date = closed_date
self.code_review_id = code_review_id
self.commits = commits
self.completion_options = completion_options
self.completion_queue_time = completion_queue_time
self.created_by = created_by
self.creation_date = creation_date
self.description = description
self.fork_source = fork_source
self.has_multiple_merge_bases = has_multiple_merge_bases
self.is_draft = is_draft
self.labels = labels
self.last_merge_commit = last_merge_commit
self.last_merge_source_commit = last_merge_source_commit
self.last_merge_target_commit = last_merge_target_commit
self.merge_failure_message = merge_failure_message
self.merge_failure_type = merge_failure_type
self.merge_id = merge_id
self.merge_options = merge_options
self.merge_status = merge_status
self.pull_request_id = pull_request_id
self.remote_url = remote_url
self.repository = repository
self.reviewers = reviewers
self.source_ref_name = source_ref_name
self.status = status
self.supports_iterations = supports_iterations
self.target_ref_name = target_ref_name
self.title = title
self.url = url
self.work_item_refs = work_item_refs
class GitPullRequestCommentThread(CommentThread):
"""
Represents a comment thread of a pull request. A thread contains meta data about the file it was left on (if any) along with one or more comments (an initial comment and the subsequent replies).
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param comments: A list of the comments.
:type comments: list of :class:`Comment <azure.devops.v7_1.git.models.Comment>`
:param id: The comment thread id.
:type id: int
:param identities: Set of identities related to this thread
:type identities: dict
:param is_deleted: Specify if the thread is deleted which happens when all comments are deleted.
:type is_deleted: bool
:param last_updated_date: The time this thread was last updated.
:type last_updated_date: datetime
:param properties: Optional properties associated with the thread as a collection of key-value pairs.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
:param published_date: The time this thread was published.
:type published_date: datetime
:param status: The status of the comment thread.
:type status: object
:param thread_context: Specify thread context such as position in left/right file.
:type thread_context: :class:`CommentThreadContext <azure.devops.v7_1.git.models.CommentThreadContext>`
:param pull_request_thread_context: Extended context information unique to pull requests
:type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext <azure.devops.v7_1.git.models.GitPullRequestCommentThreadContext>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comments': {'key': 'comments', 'type': '[Comment]'},
'id': {'key': 'id', 'type': 'int'},
'identities': {'key': 'identities', 'type': '{IdentityRef}'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
'properties': {'key': 'properties', 'type': 'object'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'object'},
'thread_context': {'key': 'threadContext', 'type': 'CommentThreadContext'},
'pull_request_thread_context': {'key': 'pullRequestThreadContext', 'type': 'GitPullRequestCommentThreadContext'}
}
def __init__(self, _links=None, comments=None, id=None, identities=None, is_deleted=None, last_updated_date=None, properties=None, published_date=None, status=None, thread_context=None, pull_request_thread_context=None):
super(GitPullRequestCommentThread, self).__init__(_links=_links, comments=comments, id=id, identities=identities, is_deleted=is_deleted, last_updated_date=last_updated_date, properties=properties, published_date=published_date, status=status, thread_context=thread_context)
self.pull_request_thread_context = pull_request_thread_context
class GitPullRequestCommentThreadContext(Model):
"""
Comment thread context contains details about what diffs were being viewed at the time of thread creation and whether or not the thread has been tracked from that original diff.
:param change_tracking_id: Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests.
:type change_tracking_id: int
:param iteration_context: The iteration context being viewed when the thread was created.
:type iteration_context: :class:`CommentIterationContext <azure.devops.v7_1.git.models.CommentIterationContext>`
:param tracking_criteria: The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria.
:type tracking_criteria: :class:`CommentTrackingCriteria <azure.devops.v7_1.git.models.CommentTrackingCriteria>`
"""
_attribute_map = {
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'},
'iteration_context': {'key': 'iterationContext', 'type': 'CommentIterationContext'},
'tracking_criteria': {'key': 'trackingCriteria', 'type': 'CommentTrackingCriteria'}
}
def __init__(self, change_tracking_id=None, iteration_context=None, tracking_criteria=None):
super(GitPullRequestCommentThreadContext, self).__init__()
self.change_tracking_id = change_tracking_id
self.iteration_context = iteration_context
self.tracking_criteria = tracking_criteria
class GitPullRequestCompletionOptions(Model):
"""
Preferences about how the pull request should be completed.
:param auto_complete_ignore_config_ids: List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true).
:type auto_complete_ignore_config_ids: list of int
:param bypass_policy: If true, policies will be explicitly bypassed while the pull request is completed.
:type bypass_policy: bool
:param bypass_reason: If policies are bypassed, this reason is stored as to why bypass was used.
:type bypass_reason: str
:param delete_source_branch: If true, the source branch of the pull request will be deleted after completion.
:type delete_source_branch: bool
:param merge_commit_message: If set, this will be used as the commit message of the merge commit.
:type merge_commit_message: str
:param merge_strategy: Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored.
:type merge_strategy: object
:param squash_merge: SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true.
:type squash_merge: bool
:param transition_work_items: If true, we will attempt to transition any work items linked to the pull request into the next logical state (i.e. Active -> Resolved)
:type transition_work_items: bool
:param triggered_by_auto_complete: If true, the current completion attempt was triggered via auto-complete. Used internally.
:type triggered_by_auto_complete: bool
"""
_attribute_map = {
'auto_complete_ignore_config_ids': {'key': 'autoCompleteIgnoreConfigIds', 'type': '[int]'},
'bypass_policy': {'key': 'bypassPolicy', 'type': 'bool'},
'bypass_reason': {'key': 'bypassReason', 'type': 'str'},
'delete_source_branch': {'key': 'deleteSourceBranch', 'type': 'bool'},
'merge_commit_message': {'key': 'mergeCommitMessage', 'type': 'str'},
'merge_strategy': {'key': 'mergeStrategy', 'type': 'object'},
'squash_merge': {'key': 'squashMerge', 'type': 'bool'},
'transition_work_items': {'key': 'transitionWorkItems', 'type': 'bool'},
'triggered_by_auto_complete': {'key': 'triggeredByAutoComplete', 'type': 'bool'}
}
def __init__(self, auto_complete_ignore_config_ids=None, bypass_policy=None, bypass_reason=None, delete_source_branch=None, merge_commit_message=None, merge_strategy=None, squash_merge=None, transition_work_items=None, triggered_by_auto_complete=None):
super(GitPullRequestCompletionOptions, self).__init__()
self.auto_complete_ignore_config_ids = auto_complete_ignore_config_ids
self.bypass_policy = bypass_policy
self.bypass_reason = bypass_reason
self.delete_source_branch = delete_source_branch
self.merge_commit_message = merge_commit_message
self.merge_strategy = merge_strategy
self.squash_merge = squash_merge
self.transition_work_items = transition_work_items
self.triggered_by_auto_complete = triggered_by_auto_complete
class GitPullRequestChange(Model):
"""
Change made in a pull request.
:param change_tracking_id: ID used to track files through multiple changes.
:type change_tracking_id: int
"""
_attribute_map = {
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
}
def __init__(self, change_tracking_id=None):
super(GitPullRequestChange, self).__init__()
self.change_tracking_id = change_tracking_id
class GitPullRequestIteration(Model):
"""
Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request.
:param _links: A collection of related REST reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: Author of the pull request iteration.
:type author: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param commits: The commits included with the pull request iteration.
:type commits: list of :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param common_ref_commit: The first common Git commit of the source and target refs.
:type common_ref_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param created_date: The creation date of the pull request iteration.
:type created_date: datetime
:param description: Description of the pull request iteration.
:type description: str
:param has_more_commits: Indicates if the Commits property contains a truncated list of commits in this pull request iteration.
:type has_more_commits: bool
:param change_list: Changes included with the pull request iteration.
:type change_list: list of :class:`GitPullRequestChange <azure.devops.v7_1.git.models.GitPullRequestChange>`
:param id: ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request.
:type id: int
:param new_target_ref_name: If the iteration reason is Retarget, this is the refName of the new target
:type new_target_ref_name: str
:param old_target_ref_name: If the iteration reason is Retarget, this is the original target refName
:type old_target_ref_name: str
:param push: The Git push information associated with this pull request iteration.
:type push: :class:`GitPushRef <azure.devops.v7_1.git.models.GitPushRef>`
:param reason: The reason for which the pull request iteration was created.
:type reason: object
:param source_ref_commit: The source Git commit of this iteration.
:type source_ref_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param target_ref_commit: The target Git commit of this iteration.
:type target_ref_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param updated_date: The updated date of the pull request iteration.
:type updated_date: datetime
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'IdentityRef'},
'commits': {'key': 'commits', 'type': '[GitCommitRef]'},
'common_ref_commit': {'key': 'commonRefCommit', 'type': 'GitCommitRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'has_more_commits': {'key': 'hasMoreCommits', 'type': 'bool'},
'change_list': {'key': 'changeList', 'type': '[GitPullRequestChange]'},
'id': {'key': 'id', 'type': 'int'},
'new_target_ref_name': {'key': 'newTargetRefName', 'type': 'str'},
'old_target_ref_name': {'key': 'oldTargetRefName', 'type': 'str'},
'push': {'key': 'push', 'type': 'GitPushRef'},
'reason': {'key': 'reason', 'type': 'object'},
'source_ref_commit': {'key': 'sourceRefCommit', 'type': 'GitCommitRef'},
'target_ref_commit': {'key': 'targetRefCommit', 'type': 'GitCommitRef'},
'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}
}
def __init__(self, _links=None, author=None, commits=None, common_ref_commit=None, created_date=None, description=None, has_more_commits=None, change_list=None, id=None, new_target_ref_name=None, old_target_ref_name=None, push=None, reason=None, source_ref_commit=None, target_ref_commit=None, updated_date=None):
super(GitPullRequestIteration, self).__init__()
self._links = _links
self.author = author
self.commits = commits
self.common_ref_commit = common_ref_commit
self.created_date = created_date
self.description = description
self.has_more_commits = has_more_commits
self.change_list = change_list
self.id = id
self.new_target_ref_name = new_target_ref_name
self.old_target_ref_name = old_target_ref_name
self.push = push
self.reason = reason
self.source_ref_commit = source_ref_commit
self.target_ref_commit = target_ref_commit
self.updated_date = updated_date
class GitPullRequestIterationChanges(Model):
"""
Collection of changes made in a pull request.
:param change_entries: Changes made in the iteration.
:type change_entries: list of :class:`GitPullRequestChange <azure.devops.v7_1.git.models.GitPullRequestChange>`
:param next_skip: Value to specify as skip to get the next page of changes. This will be zero if there are no more changes.
:type next_skip: int
:param next_top: Value to specify as top to get the next page of changes. This will be zero if there are no more changes.
:type next_top: int
"""
_attribute_map = {
'change_entries': {'key': 'changeEntries', 'type': '[GitPullRequestChange]'},
'next_skip': {'key': 'nextSkip', 'type': 'int'},
'next_top': {'key': 'nextTop', 'type': 'int'}
}
def __init__(self, change_entries=None, next_skip=None, next_top=None):
super(GitPullRequestIterationChanges, self).__init__()
self.change_entries = change_entries
self.next_skip = next_skip
self.next_top = next_top
class GitPullRequestMergeOptions(Model):
"""
The options which are used when a pull request merge is created.
:param conflict_authorship_commits: If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc.
:type conflict_authorship_commits: bool
:param detect_rename_false_positives:
:type detect_rename_false_positives: bool
:param disable_renames: If true, rename detection will not be performed during the merge.
:type disable_renames: bool
"""
_attribute_map = {
'conflict_authorship_commits': {'key': 'conflictAuthorshipCommits', 'type': 'bool'},
'detect_rename_false_positives': {'key': 'detectRenameFalsePositives', 'type': 'bool'},
'disable_renames': {'key': 'disableRenames', 'type': 'bool'}
}
def __init__(self, conflict_authorship_commits=None, detect_rename_false_positives=None, disable_renames=None):
super(GitPullRequestMergeOptions, self).__init__()
self.conflict_authorship_commits = conflict_authorship_commits
self.detect_rename_false_positives = detect_rename_false_positives
self.disable_renames = disable_renames
class GitPullRequestQuery(Model):
"""
A set of pull request queries and their results.
:param queries: The queries to perform.
:type queries: list of :class:`GitPullRequestQueryInput <azure.devops.v7_1.git.models.GitPullRequestQueryInput>`
:param results: The results of the queries. This matches the QueryInputs list so Results[n] are the results of QueryInputs[n]. Each entry in the list is a dictionary of commit->pull requests.
:type results: list of {[GitPullRequest]}
"""
_attribute_map = {
'queries': {'key': 'queries', 'type': '[GitPullRequestQueryInput]'},
'results': {'key': 'results', 'type': '[{[GitPullRequest]}]'}
}
def __init__(self, queries=None, results=None):
super(GitPullRequestQuery, self).__init__()
self.queries = queries
self.results = results
class GitPullRequestQueryInput(Model):
"""
Pull request query input parameters.
:param items: The list of commit IDs to search for.
:type items: list of str
:param type: The type of query to perform.
:type type: object
"""
_attribute_map = {
'items': {'key': 'items', 'type': '[str]'},
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, items=None, type=None):
super(GitPullRequestQueryInput, self).__init__()
self.items = items
self.type = type
class GitPullRequestSearchCriteria(Model):
"""
Pull requests can be searched for matching this criteria.
:param creator_id: If set, search for pull requests that were created by this identity.
:type creator_id: str
:param include_links: Whether to include the _links field on the shallow references
:type include_links: bool
:param repository_id: If set, search for pull requests whose target branch is in this repository.
:type repository_id: str
:param reviewer_id: If set, search for pull requests that have this identity as a reviewer.
:type reviewer_id: str
:param source_ref_name: If set, search for pull requests from this branch.
:type source_ref_name: str
:param source_repository_id: If set, search for pull requests whose source branch is in this repository.
:type source_repository_id: str
:param status: If set, search for pull requests that are in this state. Defaults to Active if unset.
:type status: object
:param target_ref_name: If set, search for pull requests into this branch.
:type target_ref_name: str
"""
_attribute_map = {
'creator_id': {'key': 'creatorId', 'type': 'str'},
'include_links': {'key': 'includeLinks', 'type': 'bool'},
'repository_id': {'key': 'repositoryId', 'type': 'str'},
'reviewer_id': {'key': 'reviewerId', 'type': 'str'},
'source_ref_name': {'key': 'sourceRefName', 'type': 'str'},
'source_repository_id': {'key': 'sourceRepositoryId', 'type': 'str'},
'status': {'key': 'status', 'type': 'object'},
'target_ref_name': {'key': 'targetRefName', 'type': 'str'}
}
def __init__(self, creator_id=None, include_links=None, repository_id=None, reviewer_id=None, source_ref_name=None, source_repository_id=None, status=None, target_ref_name=None):
super(GitPullRequestSearchCriteria, self).__init__()
self.creator_id = creator_id
self.include_links = include_links
self.repository_id = repository_id
self.reviewer_id = reviewer_id
self.source_ref_name = source_ref_name
self.source_repository_id = source_repository_id
self.status = status
self.target_ref_name = target_ref_name
class GitPushRef(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param date:
:type date: datetime
:param push_correlation_id:
:type push_correlation_id: str
:param pushed_by:
:type pushed_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param push_id:
:type push_id: int
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'date': {'key': 'date', 'type': 'iso-8601'},
'push_correlation_id': {'key': 'pushCorrelationId', 'type': 'str'},
'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'},
'push_id': {'key': 'pushId', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, date=None, push_correlation_id=None, pushed_by=None, push_id=None, url=None):
super(GitPushRef, self).__init__()
self._links = _links
self.date = date
self.push_correlation_id = push_correlation_id
self.pushed_by = pushed_by
self.push_id = push_id
self.url = url
class GitPushSearchCriteria(Model):
"""
:param from_date:
:type from_date: datetime
:param include_links: Whether to include the _links field on the shallow references
:type include_links: bool
:param include_ref_updates:
:type include_ref_updates: bool
:param pusher_id:
:type pusher_id: str
:param ref_name:
:type ref_name: str
:param to_date:
:type to_date: datetime
"""
_attribute_map = {
'from_date': {'key': 'fromDate', 'type': 'iso-8601'},
'include_links': {'key': 'includeLinks', 'type': 'bool'},
'include_ref_updates': {'key': 'includeRefUpdates', 'type': 'bool'},
'pusher_id': {'key': 'pusherId', 'type': 'str'},
'ref_name': {'key': 'refName', 'type': 'str'},
'to_date': {'key': 'toDate', 'type': 'iso-8601'}
}
def __init__(self, from_date=None, include_links=None, include_ref_updates=None, pusher_id=None, ref_name=None, to_date=None):
super(GitPushSearchCriteria, self).__init__()
self.from_date = from_date
self.include_links = include_links
self.include_ref_updates = include_ref_updates
self.pusher_id = pusher_id
self.ref_name = ref_name
self.to_date = to_date
class GitQueryBranchStatsCriteria(Model):
"""
:param base_commit:
:type base_commit: :class:`GitVersionDescriptor <azure.devops.v7_1.git.models.GitVersionDescriptor>`
:param target_commits:
:type target_commits: list of :class:`GitVersionDescriptor <azure.devops.v7_1.git.models.GitVersionDescriptor>`
"""
_attribute_map = {
'base_commit': {'key': 'baseCommit', 'type': 'GitVersionDescriptor'},
'target_commits': {'key': 'targetCommits', 'type': '[GitVersionDescriptor]'}
}
def __init__(self, base_commit=None, target_commits=None):
super(GitQueryBranchStatsCriteria, self).__init__()
self.base_commit = base_commit
self.target_commits = target_commits
class GitQueryCommitsCriteria(Model):
"""
:param skip: Number of entries to skip
:type skip: int
:param top: Maximum number of entries to retrieve
:type top: int
:param author: Alias or display name of the author
:type author: str
:param compare_version: Only applicable when ItemVersion specified. If provided, start walking history starting at this commit.
:type compare_version: :class:`GitVersionDescriptor <azure.devops.v7_1.git.models.GitVersionDescriptor>`
:param exclude_deletes: Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path.
:type exclude_deletes: bool
:param from_commit_id: If provided, a lower bound for filtering commits alphabetically
:type from_commit_id: str
:param from_date: If provided, only include history entries created after this date (string)
:type from_date: str
:param history_mode: What Git history mode should be used. This only applies to the search criteria when Ids = null and an itemPath is specified.
:type history_mode: object
:param ids: If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters.
:type ids: list of str
:param include_links: Whether to include the _links field on the shallow references
:type include_links: bool
:param include_push_data: Whether to include the push information
:type include_push_data: bool
:param include_user_image_url: Whether to include the image Url for committers and authors
:type include_user_image_url: bool
:param include_work_items: Whether to include linked work items
:type include_work_items: bool
:param item_path: Path of item to search under
:type item_path: str
:param item_version: If provided, identifies the commit or branch to search
:type item_version: :class:`GitVersionDescriptor <azure.devops.v7_1.git.models.GitVersionDescriptor>`
:param show_oldest_commits_first: If enabled, this option will ignore the itemVersion and compareVersion parameters
:type show_oldest_commits_first: bool
:param to_commit_id: If provided, an upper bound for filtering commits alphabetically
:type to_commit_id: str
:param to_date: If provided, only include history entries created before this date (string)
:type to_date: str
:param user: Alias or display name of the committer
:type user: str
"""
_attribute_map = {
'skip': {'key': '$skip', 'type': 'int'},
'top': {'key': '$top', 'type': 'int'},
'author': {'key': 'author', 'type': 'str'},
'compare_version': {'key': 'compareVersion', 'type': 'GitVersionDescriptor'},
'exclude_deletes': {'key': 'excludeDeletes', 'type': 'bool'},
'from_commit_id': {'key': 'fromCommitId', 'type': 'str'},
'from_date': {'key': 'fromDate', 'type': 'str'},
'history_mode': {'key': 'historyMode', 'type': 'object'},
'ids': {'key': 'ids', 'type': '[str]'},
'include_links': {'key': 'includeLinks', 'type': 'bool'},
'include_push_data': {'key': 'includePushData', 'type': 'bool'},
'include_user_image_url': {'key': 'includeUserImageUrl', 'type': 'bool'},
'include_work_items': {'key': 'includeWorkItems', 'type': 'bool'},
'item_path': {'key': 'itemPath', 'type': 'str'},
'item_version': {'key': 'itemVersion', 'type': 'GitVersionDescriptor'},
'show_oldest_commits_first': {'key': 'showOldestCommitsFirst', 'type': 'bool'},
'to_commit_id': {'key': 'toCommitId', 'type': 'str'},
'to_date': {'key': 'toDate', 'type': 'str'},
'user': {'key': 'user', 'type': 'str'}
}
def __init__(self, skip=None, top=None, author=None, compare_version=None, exclude_deletes=None, from_commit_id=None, from_date=None, history_mode=None, ids=None, include_links=None, include_push_data=None, include_user_image_url=None, include_work_items=None, item_path=None, item_version=None, show_oldest_commits_first=None, to_commit_id=None, to_date=None, user=None):
super(GitQueryCommitsCriteria, self).__init__()
self.skip = skip
self.top = top
self.author = author
self.compare_version = compare_version
self.exclude_deletes = exclude_deletes
self.from_commit_id = from_commit_id
self.from_date = from_date
self.history_mode = history_mode
self.ids = ids
self.include_links = include_links
self.include_push_data = include_push_data
self.include_user_image_url = include_user_image_url
self.include_work_items = include_work_items
self.item_path = item_path
self.item_version = item_version
self.show_oldest_commits_first = show_oldest_commits_first
self.to_commit_id = to_commit_id
self.to_date = to_date
self.user = user
class GitRecycleBinRepositoryDetails(Model):
"""
:param deleted: Setting to false will undo earlier deletion and restore the repository.
:type deleted: bool
"""
_attribute_map = {
'deleted': {'key': 'deleted', 'type': 'bool'}
}
def __init__(self, deleted=None):
super(GitRecycleBinRepositoryDetails, self).__init__()
self.deleted = deleted
class GitRef(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param creator:
:type creator: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param is_locked:
:type is_locked: bool
:param is_locked_by:
:type is_locked_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param name:
:type name: str
:param object_id:
:type object_id: str
:param peeled_object_id:
:type peeled_object_id: str
:param statuses:
:type statuses: list of :class:`GitStatus <azure.devops.v7_1.git.models.GitStatus>`
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'creator': {'key': 'creator', 'type': 'IdentityRef'},
'is_locked': {'key': 'isLocked', 'type': 'bool'},
'is_locked_by': {'key': 'isLockedBy', 'type': 'IdentityRef'},
'name': {'key': 'name', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'peeled_object_id': {'key': 'peeledObjectId', 'type': 'str'},
'statuses': {'key': 'statuses', 'type': '[GitStatus]'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None):
super(GitRef, self).__init__()
self._links = _links
self.creator = creator
self.is_locked = is_locked
self.is_locked_by = is_locked_by
self.name = name
self.object_id = object_id
self.peeled_object_id = peeled_object_id
self.statuses = statuses
self.url = url
class GitRefFavorite(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param id:
:type id: int
:param identity_id:
:type identity_id: str
:param name:
:type name: str
:param repository_id:
:type repository_id: str
:param type:
:type type: object
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'id': {'key': 'id', 'type': 'int'},
'identity_id': {'key': 'identityId', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'},
'type': {'key': 'type', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, id=None, identity_id=None, name=None, repository_id=None, type=None, url=None):
super(GitRefFavorite, self).__init__()
self._links = _links
self.id = id
self.identity_id = identity_id
self.name = name
self.repository_id = repository_id
self.type = type
self.url = url
class GitRefUpdate(Model):
"""
:param is_locked:
:type is_locked: bool
:param name:
:type name: str
:param new_object_id:
:type new_object_id: str
:param old_object_id:
:type old_object_id: str
:param repository_id:
:type repository_id: str
"""
_attribute_map = {
'is_locked': {'key': 'isLocked', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'new_object_id': {'key': 'newObjectId', 'type': 'str'},
'old_object_id': {'key': 'oldObjectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, is_locked=None, name=None, new_object_id=None, old_object_id=None, repository_id=None):
super(GitRefUpdate, self).__init__()
self.is_locked = is_locked
self.name = name
self.new_object_id = new_object_id
self.old_object_id = old_object_id
self.repository_id = repository_id
class GitRefUpdateResult(Model):
"""
:param custom_message: Custom message for the result object For instance, Reason for failing.
:type custom_message: str
:param is_locked: Whether the ref is locked or not
:type is_locked: bool
:param name: Ref name
:type name: str
:param new_object_id: New object ID
:type new_object_id: str
:param old_object_id: Old object ID
:type old_object_id: str
:param rejected_by: Name of the plugin that rejected the updated.
:type rejected_by: str
:param repository_id: Repository ID
:type repository_id: str
:param success: True if the ref update succeeded, false otherwise
:type success: bool
:param update_status: Status of the update from the TFS server.
:type update_status: object
"""
_attribute_map = {
'custom_message': {'key': 'customMessage', 'type': 'str'},
'is_locked': {'key': 'isLocked', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'new_object_id': {'key': 'newObjectId', 'type': 'str'},
'old_object_id': {'key': 'oldObjectId', 'type': 'str'},
'rejected_by': {'key': 'rejectedBy', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'},
'success': {'key': 'success', 'type': 'bool'},
'update_status': {'key': 'updateStatus', 'type': 'object'}
}
def __init__(self, custom_message=None, is_locked=None, name=None, new_object_id=None, old_object_id=None, rejected_by=None, repository_id=None, success=None, update_status=None):
super(GitRefUpdateResult, self).__init__()
self.custom_message = custom_message
self.is_locked = is_locked
self.name = name
self.new_object_id = new_object_id
self.old_object_id = old_object_id
self.rejected_by = rejected_by
self.repository_id = repository_id
self.success = success
self.update_status = update_status
class GitRepository(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param default_branch:
:type default_branch: str
:param id:
:type id: str
:param is_disabled: True if the repository is disabled. False otherwise.
:type is_disabled: bool
:param is_fork: True if the repository was created as a fork.
:type is_fork: bool
:param is_in_maintenance: True if the repository is in maintenance. False otherwise.
:type is_in_maintenance: bool
:param name:
:type name: str
:param parent_repository:
:type parent_repository: :class:`GitRepositoryRef <azure.devops.v7_1.git.models.GitRepositoryRef>`
:param project:
:type project: :class:`TeamProjectReference <azure.devops.v7_1.git.models.TeamProjectReference>`
:param remote_url:
:type remote_url: str
:param size: Compressed size (bytes) of the repository.
:type size: long
:param ssh_url:
:type ssh_url: str
:param url:
:type url: str
:param valid_remote_urls:
:type valid_remote_urls: list of str
:param web_url:
:type web_url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'default_branch': {'key': 'defaultBranch', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'is_disabled': {'key': 'isDisabled', 'type': 'bool'},
'is_fork': {'key': 'isFork', 'type': 'bool'},
'is_in_maintenance': {'key': 'isInMaintenance', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'},
'project': {'key': 'project', 'type': 'TeamProjectReference'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'size': {'key': 'size', 'type': 'long'},
'ssh_url': {'key': 'sshUrl', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'},
'web_url': {'key': 'webUrl', 'type': 'str'}
}
def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, is_in_maintenance=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None):
super(GitRepository, self).__init__()
self._links = _links
self.default_branch = default_branch
self.id = id
self.is_disabled = is_disabled
self.is_fork = is_fork
self.is_in_maintenance = is_in_maintenance
self.name = name
self.parent_repository = parent_repository
self.project = project
self.remote_url = remote_url
self.size = size
self.ssh_url = ssh_url
self.url = url
self.valid_remote_urls = valid_remote_urls
self.web_url = web_url
class GitRepositoryCreateOptions(Model):
"""
:param name:
:type name: str
:param parent_repository:
:type parent_repository: :class:`GitRepositoryRef <azure.devops.v7_1.git.models.GitRepositoryRef>`
:param project:
:type project: :class:`TeamProjectReference <azure.devops.v7_1.git.models.TeamProjectReference>`
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'},
'project': {'key': 'project', 'type': 'TeamProjectReference'}
}
def __init__(self, name=None, parent_repository=None, project=None):
super(GitRepositoryCreateOptions, self).__init__()
self.name = name
self.parent_repository = parent_repository
self.project = project
class GitRepositoryRef(Model):
"""
:param collection: Team Project Collection where this Fork resides
:type collection: :class:`TeamProjectCollectionReference <azure.devops.v7_1.git.models.TeamProjectCollectionReference>`
:param id:
:type id: str
:param is_fork: True if the repository was created as a fork
:type is_fork: bool
:param name:
:type name: str
:param project:
:type project: :class:`TeamProjectReference <azure.devops.v7_1.git.models.TeamProjectReference>`
:param remote_url:
:type remote_url: str
:param ssh_url:
:type ssh_url: str
:param url:
:type url: str
"""
_attribute_map = {
'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'},
'id': {'key': 'id', 'type': 'str'},
'is_fork': {'key': 'isFork', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'project': {'key': 'project', 'type': 'TeamProjectReference'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'ssh_url': {'key': 'sshUrl', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, collection=None, id=None, is_fork=None, name=None, project=None, remote_url=None, ssh_url=None, url=None):
super(GitRepositoryRef, self).__init__()
self.collection = collection
self.id = id
self.is_fork = is_fork
self.name = name
self.project = project
self.remote_url = remote_url
self.ssh_url = ssh_url
self.url = url
class GitRepositoryStats(Model):
"""
:param active_pull_requests_count:
:type active_pull_requests_count: int
:param branches_count:
:type branches_count: int
:param commits_count:
:type commits_count: int
:param repository_id:
:type repository_id: str
"""
_attribute_map = {
'active_pull_requests_count': {'key': 'activePullRequestsCount', 'type': 'int'},
'branches_count': {'key': 'branchesCount', 'type': 'int'},
'commits_count': {'key': 'commitsCount', 'type': 'int'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, active_pull_requests_count=None, branches_count=None, commits_count=None, repository_id=None):
super(GitRepositoryStats, self).__init__()
self.active_pull_requests_count = active_pull_requests_count
self.branches_count = branches_count
self.commits_count = commits_count
self.repository_id = repository_id
class GitRevert(GitAsyncRefOperation):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status:
:type detailed_status: :class:`GitAsyncRefOperationDetail <azure.devops.v7_1.git.models.GitAsyncRefOperationDetail>`
:param parameters:
:type parameters: :class:`GitAsyncRefOperationParameters <azure.devops.v7_1.git.models.GitAsyncRefOperationParameters>`
:param status:
:type status: object
:param url: A URL that can be used to make further requests for status about the operation
:type url: str
:param revert_id:
:type revert_id: int
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'},
'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'},
'status': {'key': 'status', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'},
'revert_id': {'key': 'revertId', 'type': 'int'}
}
def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None, revert_id=None):
super(GitRevert, self).__init__(_links=_links, detailed_status=detailed_status, parameters=parameters, status=status, url=url)
self.revert_id = revert_id
class GitStatus(Model):
"""
This class contains the metadata of a service/extension posting a status.
:param _links: Reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param context: Context of the status.
:type context: :class:`GitStatusContext <azure.devops.v7_1.git.models.GitStatusContext>`
:param created_by: Identity that created the status.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param creation_date: Creation date and time of the status.
:type creation_date: datetime
:param description: Status description. Typically describes current state of the status.
:type description: str
:param id: Status identifier.
:type id: int
:param state: State of the status.
:type state: object
:param target_url: URL with status details.
:type target_url: str
:param updated_date: Last update date and time of the status.
:type updated_date: datetime
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'context': {'key': 'context', 'type': 'GitStatusContext'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'creation_date': {'key': 'creationDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'state': {'key': 'state', 'type': 'object'},
'target_url': {'key': 'targetUrl', 'type': 'str'},
'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}
}
def __init__(self, _links=None, context=None, created_by=None, creation_date=None, description=None, id=None, state=None, target_url=None, updated_date=None):
super(GitStatus, self).__init__()
self._links = _links
self.context = context
self.created_by = created_by
self.creation_date = creation_date
self.description = description
self.id = id
self.state = state
self.target_url = target_url
self.updated_date = updated_date
class GitStatusContext(Model):
"""
Status context that uniquely identifies the status.
:param genre: Genre of the status. Typically name of the service/tool generating the status, can be empty.
:type genre: str
:param name: Name identifier of the status, cannot be null or empty.
:type name: str
"""
_attribute_map = {
'genre': {'key': 'genre', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, genre=None, name=None):
super(GitStatusContext, self).__init__()
self.genre = genre
self.name = name
class GitSuggestion(Model):
"""
An object describing the git suggestion. Git suggestions are currently limited to suggested pull requests.
:param properties: Specific properties describing the suggestion.
:type properties: dict
:param type: The type of suggestion (e.g. pull request).
:type type: str
"""
_attribute_map = {
'properties': {'key': 'properties', 'type': '{object}'},
'type': {'key': 'type', 'type': 'str'}
}
def __init__(self, properties=None, type=None):
super(GitSuggestion, self).__init__()
self.properties = properties
self.type = type
class GitTemplate(Model):
"""
:param name: Name of the Template
:type name: str
:param type: Type of the Template
:type type: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'}
}
def __init__(self, name=None, type=None):
super(GitTemplate, self).__init__()
self.name = name
self.type = type
class GitTreeDiff(Model):
"""
:param base_tree_id: ObjectId of the base tree of this diff.
:type base_tree_id: str
:param diff_entries: List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yield more diff entries. If the continuation token is not returned all the diff entries have been included in this response.
:type diff_entries: list of :class:`GitTreeDiffEntry <azure.devops.v7_1.git.models.GitTreeDiffEntry>`
:param target_tree_id: ObjectId of the target tree of this diff.
:type target_tree_id: str
:param url: REST Url to this resource.
:type url: str
"""
_attribute_map = {
'base_tree_id': {'key': 'baseTreeId', 'type': 'str'},
'diff_entries': {'key': 'diffEntries', 'type': '[GitTreeDiffEntry]'},
'target_tree_id': {'key': 'targetTreeId', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, base_tree_id=None, diff_entries=None, target_tree_id=None, url=None):
super(GitTreeDiff, self).__init__()
self.base_tree_id = base_tree_id
self.diff_entries = diff_entries
self.target_tree_id = target_tree_id
self.url = url
class GitTreeDiffEntry(Model):
"""
:param base_object_id: SHA1 hash of the object in the base tree, if it exists. Will be null in case of adds.
:type base_object_id: str
:param change_type: Type of change that affected this entry.
:type change_type: object
:param object_type: Object type of the tree entry. Blob, Tree or Commit("submodule")
:type object_type: object
:param path: Relative path in base and target trees.
:type path: str
:param target_object_id: SHA1 hash of the object in the target tree, if it exists. Will be null in case of deletes.
:type target_object_id: str
"""
_attribute_map = {
'base_object_id': {'key': 'baseObjectId', 'type': 'str'},
'change_type': {'key': 'changeType', 'type': 'object'},
'object_type': {'key': 'objectType', 'type': 'object'},
'path': {'key': 'path', 'type': 'str'},
'target_object_id': {'key': 'targetObjectId', 'type': 'str'}
}
def __init__(self, base_object_id=None, change_type=None, object_type=None, path=None, target_object_id=None):
super(GitTreeDiffEntry, self).__init__()
self.base_object_id = base_object_id
self.change_type = change_type
self.object_type = object_type
self.path = path
self.target_object_id = target_object_id
class GitTreeDiffResponse(Model):
"""
:param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field.
:type continuation_token: list of str
:param tree_diff:
:type tree_diff: :class:`GitTreeDiff <azure.devops.v7_1.git.models.GitTreeDiff>`
"""
_attribute_map = {
'continuation_token': {'key': 'continuationToken', 'type': '[str]'},
'tree_diff': {'key': 'treeDiff', 'type': 'GitTreeDiff'}
}
def __init__(self, continuation_token=None, tree_diff=None):
super(GitTreeDiffResponse, self).__init__()
self.continuation_token = continuation_token
self.tree_diff = tree_diff
class GitTreeEntryRef(Model):
"""
:param git_object_type: Blob or tree
:type git_object_type: object
:param mode: Mode represented as octal string
:type mode: str
:param object_id: SHA1 hash of git object
:type object_id: str
:param relative_path: Path relative to parent tree object
:type relative_path: str
:param size: Size of content
:type size: long
:param url: url to retrieve tree or blob
:type url: str
"""
_attribute_map = {
'git_object_type': {'key': 'gitObjectType', 'type': 'object'},
'mode': {'key': 'mode', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'relative_path': {'key': 'relativePath', 'type': 'str'},
'size': {'key': 'size', 'type': 'long'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, git_object_type=None, mode=None, object_id=None, relative_path=None, size=None, url=None):
super(GitTreeEntryRef, self).__init__()
self.git_object_type = git_object_type
self.mode = mode
self.object_id = object_id
self.relative_path = relative_path
self.size = size
self.url = url
class GitTreeRef(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param object_id: SHA1 hash of git object
:type object_id: str
:param size: Sum of sizes of all children
:type size: long
:param tree_entries: Blobs and trees under this tree
:type tree_entries: list of :class:`GitTreeEntryRef <azure.devops.v7_1.git.models.GitTreeEntryRef>`
:param url: Url to tree
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'object_id': {'key': 'objectId', 'type': 'str'},
'size': {'key': 'size', 'type': 'long'},
'tree_entries': {'key': 'treeEntries', 'type': '[GitTreeEntryRef]'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, object_id=None, size=None, tree_entries=None, url=None):
super(GitTreeRef, self).__init__()
self._links = _links
self.object_id = object_id
self.size = size
self.tree_entries = tree_entries
self.url = url
class GitUserDate(Model):
"""
User info and date for Git operations.
:param date: Date of the Git operation.
:type date: datetime
:param email: Email address of the user performing the Git operation.
:type email: str
:param image_url: Url for the user's avatar.
:type image_url: str
:param name: Name of the user performing the Git operation.
:type name: str
"""
_attribute_map = {
'date': {'key': 'date', 'type': 'iso-8601'},
'email': {'key': 'email', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, date=None, email=None, image_url=None, name=None):
super(GitUserDate, self).__init__()
self.date = date
self.email = email
self.image_url = image_url
self.name = name
class GitVersionDescriptor(Model):
"""
:param version: Version string identifier (name of tag/branch, SHA1 of commit)
:type version: str
:param version_options: Version options - Specify additional modifiers to version (e.g Previous)
:type version_options: object
:param version_type: Version type (branch, tag, or commit). Determines how Id is interpreted
:type version_type: object
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'},
'version_options': {'key': 'versionOptions', 'type': 'object'},
'version_type': {'key': 'versionType', 'type': 'object'}
}
def __init__(self, version=None, version_options=None, version_type=None):
super(GitVersionDescriptor, self).__init__()
self.version = version
self.version_options = version_options
self.version_type = version_type
class GlobalGitRepositoryKey(Model):
"""
Globally unique key for a repository.
:param collection_id: Team Project Collection ID of the collection for the repository.
:type collection_id: str
:param project_id: Team Project ID of the project for the repository.
:type project_id: str
:param repository_id: ID of the repository.
:type repository_id: str
"""
_attribute_map = {
'collection_id': {'key': 'collectionId', 'type': 'str'},
'project_id': {'key': 'projectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, collection_id=None, project_id=None, repository_id=None):
super(GlobalGitRepositoryKey, self).__init__()
self.collection_id = collection_id
self.project_id = project_id
self.repository_id = repository_id
class GraphSubjectBase(Model):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None):
super(GraphSubjectBase, self).__init__()
self._links = _links
self.descriptor = descriptor
self.display_name = display_name
self.url = url
class Change(Model):
"""
:param change_type: The type of change that was made to the item.
:type change_type: object
:param item: Current version.
:type item: object
:param new_content: Content of the item after the change.
:type new_content: :class:`ItemContent <azure.devops.v7_1.git.models.ItemContent>`
:param source_server_item: Path of the item on the server.
:type source_server_item: str
:param url: URL to retrieve the item.
:type url: str
"""
_attribute_map = {
'change_type': {'key': 'changeType', 'type': 'object'},
'item': {'key': 'item', 'type': 'object'},
'new_content': {'key': 'newContent', 'type': 'ItemContent'},
'source_server_item': {'key': 'sourceServerItem', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None):
super(Change, self).__init__()
self.change_type = change_type
self.item = item
self.new_content = new_content
self.source_server_item = source_server_item
self.url = url
class IdentityRef(GraphSubjectBase):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
:type directory_alias: str
:param id:
:type id: str
:param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
:type image_url: str
:param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
:type inactive: bool
:param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
:type is_aad_identity: bool
:param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
:type is_container: bool
:param is_deleted_in_origin:
:type is_deleted_in_origin: bool
:param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef
:type profile_url: str
:param unique_name: Deprecated - use Domain+PrincipalName instead
:type unique_name: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None):
super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url)
self.directory_alias = directory_alias
self.id = id
self.image_url = image_url
self.inactive = inactive
self.is_aad_identity = is_aad_identity
self.is_container = is_container
self.is_deleted_in_origin = is_deleted_in_origin
self.profile_url = profile_url
self.unique_name = unique_name
class IdentityRefWithVote(IdentityRef):
"""
Identity information including a vote on a pull request.
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
:type directory_alias: str
:param id:
:type id: str
:param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
:type image_url: str
:param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
:type inactive: bool
:param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
:type is_aad_identity: bool
:param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
:type is_container: bool
:param is_deleted_in_origin:
:type is_deleted_in_origin: bool
:param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef
:type profile_url: str
:param unique_name: Deprecated - use Domain+PrincipalName instead
:type unique_name: str
:param has_declined: Indicates if this reviewer has declined to review this pull request.
:type has_declined: bool
:param is_flagged: Indicates if this reviewer is flagged for attention on this pull request.
:type is_flagged: bool
:param is_required: Indicates if this is a required reviewer for this pull request. <br /> Branches can have policies that require particular reviewers are required for pull requests.
:type is_required: bool
:param reviewer_url: URL to retrieve information about this identity
:type reviewer_url: str
:param vote: Vote on a pull request:<br /> 10 - approved 5 - approved with suggestions 0 - no vote -5 - waiting for author -10 - rejected
:type vote: int
:param voted_for: Groups or teams that this reviewer contributed to. <br /> Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes.
:type voted_for: list of :class:`IdentityRefWithVote <azure.devops.v7_1.git.models.IdentityRefWithVote>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'},
'has_declined': {'key': 'hasDeclined', 'type': 'bool'},
'is_flagged': {'key': 'isFlagged', 'type': 'bool'},
'is_required': {'key': 'isRequired', 'type': 'bool'},
'reviewer_url': {'key': 'reviewerUrl', 'type': 'str'},
'vote': {'key': 'vote', 'type': 'int'},
'voted_for': {'key': 'votedFor', 'type': '[IdentityRefWithVote]'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, has_declined=None, is_flagged=None, is_required=None, reviewer_url=None, vote=None, voted_for=None):
super(IdentityRefWithVote, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, id=id, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, is_deleted_in_origin=is_deleted_in_origin, profile_url=profile_url, unique_name=unique_name)
self.has_declined = has_declined
self.is_flagged = is_flagged
self.is_required = is_required
self.reviewer_url = reviewer_url
self.vote = vote
self.voted_for = voted_for
class ImportRepositoryValidation(Model):
"""
:param git_source:
:type git_source: :class:`GitImportGitSource <azure.devops.v7_1.git.models.GitImportGitSource>`
:param password:
:type password: str
:param tfvc_source:
:type tfvc_source: :class:`GitImportTfvcSource <azure.devops.v7_1.git.models.GitImportTfvcSource>`
:param username:
:type username: str
"""
_attribute_map = {
'git_source': {'key': 'gitSource', 'type': 'GitImportGitSource'},
'password': {'key': 'password', 'type': 'str'},
'tfvc_source': {'key': 'tfvcSource', 'type': 'GitImportTfvcSource'},
'username': {'key': 'username', 'type': 'str'}
}
def __init__(self, git_source=None, password=None, tfvc_source=None, username=None):
super(ImportRepositoryValidation, self).__init__()
self.git_source = git_source
self.password = password
self.tfvc_source = tfvc_source
self.username = username
class ItemContent(Model):
"""
:param content:
:type content: str
:param content_type:
:type content_type: object
"""
_attribute_map = {
'content': {'key': 'content', 'type': 'str'},
'content_type': {'key': 'contentType', 'type': 'object'}
}
def __init__(self, content=None, content_type=None):
super(ItemContent, self).__init__()
self.content = content
self.content_type = content_type
class ItemModel(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param content:
:type content: str
:param content_metadata:
:type content_metadata: :class:`FileContentMetadata <azure.devops.v7_1.git.models.FileContentMetadata>`
:param is_folder:
:type is_folder: bool
:param is_sym_link:
:type is_sym_link: bool
:param path:
:type path: str
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'content': {'key': 'content', 'type': 'str'},
'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'},
'is_folder': {'key': 'isFolder', 'type': 'bool'},
'is_sym_link': {'key': 'isSymLink', 'type': 'bool'},
'path': {'key': 'path', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None):
super(ItemModel, self).__init__()
self._links = _links
self.content = content
self.content_metadata = content_metadata
self.is_folder = is_folder
self.is_sym_link = is_sym_link
self.path = path
self.url = url
class JsonPatchOperation(Model):
"""
The JSON model for a JSON Patch operation
:param from_: The path to copy from for the Move/Copy operation.
:type from_: str
:param op: The patch operation
:type op: object
:param path: The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).
:type path: str
:param value: The value for the operation. This is either a primitive or a JToken.
:type value: object
"""
_attribute_map = {
'from_': {'key': 'from', 'type': 'str'},
'op': {'key': 'op', 'type': 'object'},
'path': {'key': 'path', 'type': 'str'},
'value': {'key': 'value', 'type': 'object'}
}
def __init__(self, from_=None, op=None, path=None, value=None):
super(JsonPatchOperation, self).__init__()
self.from_ = from_
self.op = op
self.path = path
self.value = value
class LineDiffBlock(Model):
"""
The class to represent the line diff block
:param change_type: Type of change that was made to the block.
:type change_type: object
:param modified_line_number_start: Line number where this block starts in modified file.
:type modified_line_number_start: int
:param modified_lines_count: Count of lines in this block in modified file.
:type modified_lines_count: int
:param original_line_number_start: Line number where this block starts in original file.
:type original_line_number_start: int
:param original_lines_count: Count of lines in this block in original file.
:type original_lines_count: int
"""
_attribute_map = {
'change_type': {'key': 'changeType', 'type': 'object'},
'modified_line_number_start': {'key': 'modifiedLineNumberStart', 'type': 'int'},
'modified_lines_count': {'key': 'modifiedLinesCount', 'type': 'int'},
'original_line_number_start': {'key': 'originalLineNumberStart', 'type': 'int'},
'original_lines_count': {'key': 'originalLinesCount', 'type': 'int'}
}
def __init__(self, change_type=None, modified_line_number_start=None, modified_lines_count=None, original_line_number_start=None, original_lines_count=None):
super(LineDiffBlock, self).__init__()
self.change_type = change_type
self.modified_line_number_start = modified_line_number_start
self.modified_lines_count = modified_lines_count
self.original_line_number_start = original_line_number_start
self.original_lines_count = original_lines_count
class PolicyConfigurationRef(Model):
"""
Policy configuration reference.
:param id: The policy configuration ID.
:type id: int
:param type: The policy configuration type.
:type type: :class:`PolicyTypeRef <azure.devops.v7_1.microsoft._team_foundation._policy._web_api.models.PolicyTypeRef>`
:param url: The URL where the policy configuration can be retrieved.
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'type': {'key': 'type', 'type': 'PolicyTypeRef'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, type=None, url=None):
super(PolicyConfigurationRef, self).__init__()
self.id = id
self.type = type
self.url = url
class PolicyTypeRef(Model):
"""
Policy type reference.
:param display_name: Display name of the policy type.
:type display_name: str
:param id: The policy type ID.
:type id: str
:param url: The URL where the policy type can be retrieved.
:type url: str
"""
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, display_name=None, id=None, url=None):
super(PolicyTypeRef, self).__init__()
self.display_name = display_name
self.id = id
self.url = url
class ReferenceLinks(Model):
"""
The class to represent a collection of REST reference links.
:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""
_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}
def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
class ResourceRef(Model):
"""
:param id:
:type id: str
:param url:
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, url=None):
super(ResourceRef, self).__init__()
self.id = id
self.url = url
class ShareNotificationContext(Model):
"""
Context used while sharing a pull request.
:param message: Optional user note or message.
:type message: str
:param receivers: Identities of users who will receive a share notification.
:type receivers: list of :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
"""
_attribute_map = {
'message': {'key': 'message', 'type': 'str'},
'receivers': {'key': 'receivers', 'type': '[IdentityRef]'}
}
def __init__(self, message=None, receivers=None):
super(ShareNotificationContext, self).__init__()
self.message = message
self.receivers = receivers
class SourceToTargetRef(Model):
"""
:param source_ref: The source ref to copy. For example, refs/heads/master.
:type source_ref: str
:param target_ref: The target ref to update. For example, refs/heads/master.
:type target_ref: str
"""
_attribute_map = {
'source_ref': {'key': 'sourceRef', 'type': 'str'},
'target_ref': {'key': 'targetRef', 'type': 'str'}
}
def __init__(self, source_ref=None, target_ref=None):
super(SourceToTargetRef, self).__init__()
self.source_ref = source_ref
self.target_ref = target_ref
class TeamProjectCollectionReference(Model):
"""
Reference object for a TeamProjectCollection.
:param avatar_url: Collection avatar Url.
:type avatar_url: str
:param id: Collection Id.
:type id: str
:param name: Collection Name.
:type name: str
:param url: Collection REST Url.
:type url: str
"""
_attribute_map = {
'avatar_url': {'key': 'avatarUrl', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, avatar_url=None, id=None, name=None, url=None):
super(TeamProjectCollectionReference, self).__init__()
self.avatar_url = avatar_url
self.id = id
self.name = name
self.url = url
class TeamProjectReference(Model):
"""
Represents a shallow reference to a TeamProject.
:param abbreviation: Project abbreviation.
:type abbreviation: str
:param default_team_image_url: Url to default team identity image.
:type default_team_image_url: str
:param description: The project's description (if any).
:type description: str
:param id: Project identifier.
:type id: str
:param last_update_time: Project last update time.
:type last_update_time: datetime
:param name: Project name.
:type name: str
:param revision: Project revision.
:type revision: long
:param state: Project state.
:type state: object
:param url: Url to the full version of the object.
:type url: str
:param visibility: Project visibility.
:type visibility: object
"""
_attribute_map = {
'abbreviation': {'key': 'abbreviation', 'type': 'str'},
'default_team_image_url': {'key': 'defaultTeamImageUrl', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'long'},
'state': {'key': 'state', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'},
'visibility': {'key': 'visibility', 'type': 'object'}
}
def __init__(self, abbreviation=None, default_team_image_url=None, description=None, id=None, last_update_time=None, name=None, revision=None, state=None, url=None, visibility=None):
super(TeamProjectReference, self).__init__()
self.abbreviation = abbreviation
self.default_team_image_url = default_team_image_url
self.description = description
self.id = id
self.last_update_time = last_update_time
self.name = name
self.revision = revision
self.state = state
self.url = url
self.visibility = visibility
class VersionedPolicyConfigurationRef(PolicyConfigurationRef):
"""
A particular revision for a policy configuration.
:param id: The policy configuration ID.
:type id: int
:param type: The policy configuration type.
:type type: :class:`PolicyTypeRef <azure.devops.v7_1.microsoft._team_foundation._policy._web_api.models.PolicyTypeRef>`
:param url: The URL where the policy configuration can be retrieved.
:type url: str
:param revision: The policy configuration revision ID.
:type revision: int
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'type': {'key': 'type', 'type': 'PolicyTypeRef'},
'url': {'key': 'url', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'}
}
def __init__(self, id=None, type=None, url=None, revision=None):
super(VersionedPolicyConfigurationRef, self).__init__(id=id, type=type, url=url)
self.revision = revision
class VstsInfo(Model):
"""
:param collection:
:type collection: :class:`TeamProjectCollectionReference <azure.devops.v7_1.git.models.TeamProjectCollectionReference>`
:param repository:
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
:param server_url:
:type server_url: str
"""
_attribute_map = {
'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'},
'repository': {'key': 'repository', 'type': 'GitRepository'},
'server_url': {'key': 'serverUrl', 'type': 'str'}
}
def __init__(self, collection=None, repository=None, server_url=None):
super(VstsInfo, self).__init__()
self.collection = collection
self.repository = repository
self.server_url = server_url
class WebApiCreateTagRequestData(Model):
"""
The representation of data needed to create a tag definition which is sent across the wire.
:param name: Name of the tag definition that will be created.
:type name: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, name=None):
super(WebApiCreateTagRequestData, self).__init__()
self.name = name
class WebApiTagDefinition(Model):
"""
The representation of a tag definition which is sent across the wire.
:param active: Whether or not the tag definition is active.
:type active: bool
:param id: ID of the tag definition.
:type id: str
:param name: The name of the tag definition.
:type name: str
:param url: Resource URL for the Tag Definition.
:type url: str
"""
_attribute_map = {
'active': {'key': 'active', 'type': 'bool'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, active=None, id=None, name=None, url=None):
super(WebApiTagDefinition, self).__init__()
self.active = active
self.id = id
self.name = name
self.url = url
class GitBaseVersionDescriptor(GitVersionDescriptor):
"""
:param version: Version string identifier (name of tag/branch, SHA1 of commit)
:type version: str
:param version_options: Version options - Specify additional modifiers to version (e.g Previous)
:type version_options: object
:param version_type: Version type (branch, tag, or commit). Determines how Id is interpreted
:type version_type: object
:param base_version: Version string identifier (name of tag/branch, SHA1 of commit)
:type base_version: str
:param base_version_options: Version options - Specify additional modifiers to version (e.g Previous)
:type base_version_options: object
:param base_version_type: Version type (branch, tag, or commit). Determines how Id is interpreted
:type base_version_type: object
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'},
'version_options': {'key': 'versionOptions', 'type': 'object'},
'version_type': {'key': 'versionType', 'type': 'object'},
'base_version': {'key': 'baseVersion', 'type': 'str'},
'base_version_options': {'key': 'baseVersionOptions', 'type': 'object'},
'base_version_type': {'key': 'baseVersionType', 'type': 'object'}
}
def __init__(self, version=None, version_options=None, version_type=None, base_version=None, base_version_options=None, base_version_type=None):
super(GitBaseVersionDescriptor, self).__init__(version=version, version_options=version_options, version_type=version_type)
self.base_version = base_version
self.base_version_options = base_version_options
self.base_version_type = base_version_type
class GitCommit(GitCommitRef):
"""
:param _links: A collection of related REST reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: Author of the commit.
:type author: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param comment: Comment or message of the commit.
:type comment: str
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
:type comment_truncated: bool
:param commit_id: ID (SHA-1) of the commit.
:type commit_id: str
:param committer: Committer of the commit.
:type committer: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param commit_too_many_changes: Indicates that commit contains too many changes to be displayed
:type commit_too_many_changes: bool
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
:type change_counts: dict
:param changes: An enumeration of the changes included with the commit.
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
:param parents: An enumeration of the parent commit IDs for this commit.
:type parents: list of str
:param push: The push associated with this commit.
:type push: :class:`GitPushRef <azure.devops.v7_1.git.models.GitPushRef>`
:param remote_url: Remote URL path to the commit.
:type remote_url: str
:param statuses: A list of status metadata from services and extensions that may associate additional information to the commit.
:type statuses: list of :class:`GitStatus <azure.devops.v7_1.git.models.GitStatus>`
:param url: REST URL for this resource.
:type url: str
:param work_items: A list of workitems associated with this commit.
:type work_items: list of :class:`ResourceRef <azure.devops.v7_1.git.models.ResourceRef>`
:param tree_id:
:type tree_id: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'committer': {'key': 'committer', 'type': 'GitUserDate'},
'commit_too_many_changes': {'key': 'commitTooManyChanges', 'type': 'bool'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[object]'},
'parents': {'key': 'parents', 'type': '[str]'},
'push': {'key': 'push', 'type': 'GitPushRef'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'statuses': {'key': 'statuses', 'type': '[GitStatus]'},
'url': {'key': 'url', 'type': 'str'},
'work_items': {'key': 'workItems', 'type': '[ResourceRef]'},
'tree_id': {'key': 'treeId', 'type': 'str'}
}
def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, commit_id=None, committer=None, commit_too_many_changes=None, change_counts=None, changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None, tree_id=None):
super(GitCommit, self).__init__(_links=_links, author=author, comment=comment, comment_truncated=comment_truncated, commit_id=commit_id, committer=committer, commit_too_many_changes=commit_too_many_changes, change_counts=change_counts, changes=changes, parents=parents, push=push, remote_url=remote_url, statuses=statuses, url=url, work_items=work_items)
self.tree_id = tree_id
class GitForkRef(GitRef):
"""
Information about a fork ref.
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param creator:
:type creator: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param is_locked:
:type is_locked: bool
:param is_locked_by:
:type is_locked_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param name:
:type name: str
:param object_id:
:type object_id: str
:param peeled_object_id:
:type peeled_object_id: str
:param statuses:
:type statuses: list of :class:`GitStatus <azure.devops.v7_1.git.models.GitStatus>`
:param url:
:type url: str
:param repository: The repository ID of the fork.
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'creator': {'key': 'creator', 'type': 'IdentityRef'},
'is_locked': {'key': 'isLocked', 'type': 'bool'},
'is_locked_by': {'key': 'isLockedBy', 'type': 'IdentityRef'},
'name': {'key': 'name', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'peeled_object_id': {'key': 'peeledObjectId', 'type': 'str'},
'statuses': {'key': 'statuses', 'type': '[GitStatus]'},
'url': {'key': 'url', 'type': 'str'},
'repository': {'key': 'repository', 'type': 'GitRepository'}
}
def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None, repository=None):
super(GitForkRef, self).__init__(_links=_links, creator=creator, is_locked=is_locked, is_locked_by=is_locked_by, name=name, object_id=object_id, peeled_object_id=peeled_object_id, statuses=statuses, url=url)
self.repository = repository
class GitItem(ItemModel):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param content:
:type content: str
:param content_metadata:
:type content_metadata: :class:`FileContentMetadata <azure.devops.v7_1.git.models.FileContentMetadata>`
:param is_folder:
:type is_folder: bool
:param is_sym_link:
:type is_sym_link: bool
:param path:
:type path: str
:param url:
:type url: str
:param commit_id: SHA1 of commit item was fetched at
:type commit_id: str
:param git_object_type: Type of object (Commit, Tree, Blob, Tag, ...)
:type git_object_type: object
:param latest_processed_change: Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached
:type latest_processed_change: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param object_id: Git object id
:type object_id: str
:param original_object_id: Git object id
:type original_object_id: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'content': {'key': 'content', 'type': 'str'},
'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'},
'is_folder': {'key': 'isFolder', 'type': 'bool'},
'is_sym_link': {'key': 'isSymLink', 'type': 'bool'},
'path': {'key': 'path', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'git_object_type': {'key': 'gitObjectType', 'type': 'object'},
'latest_processed_change': {'key': 'latestProcessedChange', 'type': 'GitCommitRef'},
'object_id': {'key': 'objectId', 'type': 'str'},
'original_object_id': {'key': 'originalObjectId', 'type': 'str'}
}
def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, commit_id=None, git_object_type=None, latest_processed_change=None, object_id=None, original_object_id=None):
super(GitItem, self).__init__(_links=_links, content=content, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url)
self.commit_id = commit_id
self.git_object_type = git_object_type
self.latest_processed_change = latest_processed_change
self.object_id = object_id
self.original_object_id = original_object_id
class GitMerge(GitMergeParameters):
"""
:param comment: Comment or message of the commit.
:type comment: str
:param parents: An enumeration of the parent commit IDs for the merge commit.
:type parents: list of str
:param _links: Reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status: Detailed status of the merge operation.
:type detailed_status: :class:`GitMergeOperationStatusDetail <azure.devops.v7_1.git.models.GitMergeOperationStatusDetail>`
:param merge_operation_id: Unique identifier for the merge operation.
:type merge_operation_id: int
:param status: Status of the merge operation.
:type status: object
"""
_attribute_map = {
'comment': {'key': 'comment', 'type': 'str'},
'parents': {'key': 'parents', 'type': '[str]'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitMergeOperationStatusDetail'},
'merge_operation_id': {'key': 'mergeOperationId', 'type': 'int'},
'status': {'key': 'status', 'type': 'object'}
}
def __init__(self, comment=None, parents=None, _links=None, detailed_status=None, merge_operation_id=None, status=None):
super(GitMerge, self).__init__(comment=comment, parents=parents)
self._links = _links
self.detailed_status = detailed_status
self.merge_operation_id = merge_operation_id
self.status = status
class GitPullRequestStatus(GitStatus):
"""
This class contains the metadata of a service/extension posting pull request status. Status can be associated with a pull request or an iteration.
:param _links: Reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param context: Context of the status.
:type context: :class:`GitStatusContext <azure.devops.v7_1.git.models.GitStatusContext>`
:param created_by: Identity that created the status.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param creation_date: Creation date and time of the status.
:type creation_date: datetime
:param description: Status description. Typically describes current state of the status.
:type description: str
:param id: Status identifier.
:type id: int
:param state: State of the status.
:type state: object
:param target_url: URL with status details.
:type target_url: str
:param updated_date: Last update date and time of the status.
:type updated_date: datetime
:param iteration_id: ID of the iteration to associate status with. Minimum value is 1.
:type iteration_id: int
:param properties: Custom properties of the status.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'context': {'key': 'context', 'type': 'GitStatusContext'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'creation_date': {'key': 'creationDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'state': {'key': 'state', 'type': 'object'},
'target_url': {'key': 'targetUrl', 'type': 'str'},
'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'},
'iteration_id': {'key': 'iterationId', 'type': 'int'},
'properties': {'key': 'properties', 'type': 'object'}
}
def __init__(self, _links=None, context=None, created_by=None, creation_date=None, description=None, id=None, state=None, target_url=None, updated_date=None, iteration_id=None, properties=None):
super(GitPullRequestStatus, self).__init__(_links=_links, context=context, created_by=created_by, creation_date=creation_date, description=description, id=id, state=state, target_url=target_url, updated_date=updated_date)
self.iteration_id = iteration_id
self.properties = properties
class GitPush(GitPushRef):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param date:
:type date: datetime
:param push_correlation_id:
:type push_correlation_id: str
:param pushed_by:
:type pushed_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param push_id:
:type push_id: int
:param url:
:type url: str
:param commits:
:type commits: list of :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param ref_updates:
:type ref_updates: list of :class:`GitRefUpdate <azure.devops.v7_1.git.models.GitRefUpdate>`
:param repository:
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'date': {'key': 'date', 'type': 'iso-8601'},
'push_correlation_id': {'key': 'pushCorrelationId', 'type': 'str'},
'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'},
'push_id': {'key': 'pushId', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'},
'commits': {'key': 'commits', 'type': '[GitCommitRef]'},
'ref_updates': {'key': 'refUpdates', 'type': '[GitRefUpdate]'},
'repository': {'key': 'repository', 'type': 'GitRepository'}
}
def __init__(self, _links=None, date=None, push_correlation_id=None, pushed_by=None, push_id=None, url=None, commits=None, ref_updates=None, repository=None):
super(GitPush, self).__init__(_links=_links, date=date, push_correlation_id=push_correlation_id, pushed_by=pushed_by, push_id=push_id, url=url)
self.commits = commits
self.ref_updates = ref_updates
self.repository = repository
class GitTargetVersionDescriptor(GitVersionDescriptor):
"""
:param version: Version string identifier (name of tag/branch, SHA1 of commit)
:type version: str
:param version_options: Version options - Specify additional modifiers to version (e.g Previous)
:type version_options: object
:param version_type: Version type (branch, tag, or commit). Determines how Id is interpreted
:type version_type: object
:param target_version: Version string identifier (name of tag/branch, SHA1 of commit)
:type target_version: str
:param target_version_options: Version options - Specify additional modifiers to version (e.g Previous)
:type target_version_options: object
:param target_version_type: Version type (branch, tag, or commit). Determines how Id is interpreted
:type target_version_type: object
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'},
'version_options': {'key': 'versionOptions', 'type': 'object'},
'version_type': {'key': 'versionType', 'type': 'object'},
'target_version': {'key': 'targetVersion', 'type': 'str'},
'target_version_options': {'key': 'targetVersionOptions', 'type': 'object'},
'target_version_type': {'key': 'targetVersionType', 'type': 'object'}
}
def __init__(self, version=None, version_options=None, version_type=None, target_version=None, target_version_options=None, target_version_type=None):
super(GitTargetVersionDescriptor, self).__init__(version=version, version_options=version_options, version_type=version_type)
self.target_version = target_version
self.target_version_options = target_version_options
self.target_version_type = target_version_type
class PolicyConfiguration(VersionedPolicyConfigurationRef):
"""
The full policy configuration with settings.
:param id: The policy configuration ID.
:type id: int
:param type: The policy configuration type.
:type type: :class:`PolicyTypeRef <azure.devops.v7_1.microsoft._team_foundation._policy._web_api.models.PolicyTypeRef>`
:param url: The URL where the policy configuration can be retrieved.
:type url: str
:param revision: The policy configuration revision ID.
:type revision: int
:param _links: The links to other objects related to this object.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._team_foundation._policy._web_api.models.ReferenceLinks>`
:param created_by: A reference to the identity that created the policy.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.microsoft._team_foundation._policy._web_api.models.IdentityRef>`
:param created_date: The date and time when the policy was created.
:type created_date: datetime
:param is_blocking: Indicates whether the policy is blocking.
:type is_blocking: bool
:param is_deleted: Indicates whether the policy has been (soft) deleted.
:type is_deleted: bool
:param is_enabled: Indicates whether the policy is enabled.
:type is_enabled: bool
:param is_enterprise_managed: If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete.
:type is_enterprise_managed: bool
:param settings: The policy configuration settings.
:type settings: object
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'type': {'key': 'type', 'type': 'PolicyTypeRef'},
'url': {'key': 'url', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'is_blocking': {'key': 'isBlocking', 'type': 'bool'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'is_enterprise_managed': {'key': 'isEnterpriseManaged', 'type': 'bool'},
'settings': {'key': 'settings', 'type': 'object'}
}
def __init__(self, id=None, type=None, url=None, revision=None, _links=None, created_by=None, created_date=None, is_blocking=None, is_deleted=None, is_enabled=None, is_enterprise_managed=None, settings=None):
super(PolicyConfiguration, self).__init__(id=id, type=type, url=url, revision=revision)
self._links = _links
self.created_by = created_by
self.created_date = created_date
self.is_blocking = is_blocking
self.is_deleted = is_deleted
self.is_enabled = is_enabled
self.is_enterprise_managed = is_enterprise_managed
self.settings = settings
__all__ = [
'AdvSecEnablementStatus',
'AdvSecEnablementUpdate',
'Attachment',
'BillableCommitter',
'BillableCommitterDetail',
'Comment',
'CommentIterationContext',
'CommentPosition',
'CommentThread',
'CommentThreadContext',
'CommentTrackingCriteria',
'FileContentMetadata',
'FileDiff',
'FileDiffParams',
'FileDiffsCriteria',
'GitAnnotatedTag',
'GitAsyncRefOperation',
'GitAsyncRefOperationDetail',
'GitAsyncRefOperationParameters',
'GitAsyncRefOperationSource',
'GitBlobRef',
'GitBranchStats',
'GitCommitDiffs',
'GitCommitChanges',
'GitCommitRef',
'GitConflict',
'GitConflictUpdateResult',
'GitDeletedRepository',
'GitFilePathsCollection',
'GitForkOperationStatusDetail',
'GitForkSyncRequest',
'GitForkSyncRequestParameters',
'GitCherryPick',
'GitImportGitSource',
'GitImportRequest',
'GitImportRequestParameters',
'GitImportStatusDetail',
'GitImportTfvcSource',
'GitItemDescriptor',
'GitItemRequestData',
'GitMergeOperationStatusDetail',
'GitMergeOriginRef',
'GitMergeParameters',
'GitObject',
'GitPolicyConfigurationResponse',
'GitPullRequest',
'GitPullRequestCommentThread',
'GitPullRequestCommentThreadContext',
'GitPullRequestCompletionOptions',
'GitPullRequestChange',
'GitPullRequestIteration',
'GitPullRequestIterationChanges',
'GitPullRequestMergeOptions',
'GitPullRequestQuery',
'GitPullRequestQueryInput',
'GitPullRequestSearchCriteria',
'GitPushRef',
'GitPushSearchCriteria',
'GitQueryBranchStatsCriteria',
'GitQueryCommitsCriteria',
'GitRecycleBinRepositoryDetails',
'GitRef',
'GitRefFavorite',
'GitRefUpdate',
'GitRefUpdateResult',
'GitRepository',
'GitRepositoryCreateOptions',
'GitRepositoryRef',
'GitRepositoryStats',
'GitRevert',
'GitStatus',
'GitStatusContext',
'GitSuggestion',
'GitTemplate',
'GitTreeDiff',
'GitTreeDiffEntry',
'GitTreeDiffResponse',
'GitTreeEntryRef',
'GitTreeRef',
'GitUserDate',
'GitVersionDescriptor',
'GlobalGitRepositoryKey',
'GraphSubjectBase',
'Change',
'IdentityRef',
'IdentityRefWithVote',
'ImportRepositoryValidation',
'ItemContent',
'ItemModel',
'JsonPatchOperation',
'LineDiffBlock',
'PolicyConfigurationRef',
'PolicyTypeRef',
'ReferenceLinks',
'ResourceRef',
'ShareNotificationContext',
'SourceToTargetRef',
'TeamProjectCollectionReference',
'TeamProjectReference',
'VersionedPolicyConfigurationRef',
'VstsInfo',
'WebApiCreateTagRequestData',
'WebApiTagDefinition',
'GitBaseVersionDescriptor',
'GitCommit',
'GitForkRef',
'GitItem',
'GitMerge',
'GitPullRequestStatus',
'GitPush',
'GitTargetVersionDescriptor',
'PolicyConfiguration',
]
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/git/models.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/git/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 67264
}
| 341 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class Artifact(Model):
"""
Artifacts are collections of files produced by a pipeline. Use artifacts to share files between stages in a pipeline or between different pipelines.
:param name: The name of the artifact.
:type name: str
:param signed_content: Signed url for downloading this artifact
:type signed_content: :class:`SignedUrl <azure.devops.v7_1.pipelines.models.SignedUrl>`
:param url: Self-referential url
:type url: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'signed_content': {'key': 'signedContent', 'type': 'SignedUrl'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, name=None, signed_content=None, url=None):
super(Artifact, self).__init__()
self.name = name
self.signed_content = signed_content
self.url = url
class BuildResourceParameters(Model):
"""
:param version:
:type version: str
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, version=None):
super(BuildResourceParameters, self).__init__()
self.version = version
class Container(Model):
"""
:param environment:
:type environment: dict
:param image:
:type image: str
:param map_docker_socket:
:type map_docker_socket: bool
:param options:
:type options: str
:param ports:
:type ports: list of str
:param volumes:
:type volumes: list of str
"""
_attribute_map = {
'environment': {'key': 'environment', 'type': '{str}'},
'image': {'key': 'image', 'type': 'str'},
'map_docker_socket': {'key': 'mapDockerSocket', 'type': 'bool'},
'options': {'key': 'options', 'type': 'str'},
'ports': {'key': 'ports', 'type': '[str]'},
'volumes': {'key': 'volumes', 'type': '[str]'}
}
def __init__(self, environment=None, image=None, map_docker_socket=None, options=None, ports=None, volumes=None):
super(Container, self).__init__()
self.environment = environment
self.image = image
self.map_docker_socket = map_docker_socket
self.options = options
self.ports = ports
self.volumes = volumes
class ContainerResource(Model):
"""
:param container:
:type container: :class:`Container <azure.devops.v7_1.pipelines.models.Container>`
"""
_attribute_map = {
'container': {'key': 'container', 'type': 'Container'}
}
def __init__(self, container=None):
super(ContainerResource, self).__init__()
self.container = container
class ContainerResourceParameters(Model):
"""
:param version:
:type version: str
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, version=None):
super(ContainerResourceParameters, self).__init__()
self.version = version
class CreatePipelineConfigurationParameters(Model):
"""
Configuration parameters of the pipeline.
:param type: Type of configuration.
:type type: object
"""
_attribute_map = {
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, type=None):
super(CreatePipelineConfigurationParameters, self).__init__()
self.type = type
class CreatePipelineParameters(Model):
"""
Parameters to create a pipeline.
:param configuration: Configuration parameters of the pipeline.
:type configuration: :class:`CreatePipelineConfigurationParameters <azure.devops.v7_1.pipelines.models.CreatePipelineConfigurationParameters>`
:param folder: Folder of the pipeline.
:type folder: str
:param name: Name of the pipeline.
:type name: str
"""
_attribute_map = {
'configuration': {'key': 'configuration', 'type': 'CreatePipelineConfigurationParameters'},
'folder': {'key': 'folder', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, configuration=None, folder=None, name=None):
super(CreatePipelineParameters, self).__init__()
self.configuration = configuration
self.folder = folder
self.name = name
class Log(Model):
"""
Log for a pipeline.
:param created_on: The date and time the log was created.
:type created_on: datetime
:param id: The ID of the log.
:type id: int
:param last_changed_on: The date and time the log was last changed.
:type last_changed_on: datetime
:param line_count: The number of lines in the log.
:type line_count: long
:param signed_content:
:type signed_content: :class:`SignedUrl <azure.devops.v7_1.pipelines.models.SignedUrl>`
:param url:
:type url: str
"""
_attribute_map = {
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'int'},
'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'},
'line_count': {'key': 'lineCount', 'type': 'long'},
'signed_content': {'key': 'signedContent', 'type': 'SignedUrl'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, created_on=None, id=None, last_changed_on=None, line_count=None, signed_content=None, url=None):
super(Log, self).__init__()
self.created_on = created_on
self.id = id
self.last_changed_on = last_changed_on
self.line_count = line_count
self.signed_content = signed_content
self.url = url
class LogCollection(Model):
"""
A collection of logs.
:param logs: The list of logs.
:type logs: list of :class:`Log <azure.devops.v7_1.pipelines.models.Log>`
:param signed_content:
:type signed_content: :class:`SignedUrl <azure.devops.v7_1.pipelines.models.SignedUrl>`
:param url: URL of the log.
:type url: str
"""
_attribute_map = {
'logs': {'key': 'logs', 'type': '[Log]'},
'signed_content': {'key': 'signedContent', 'type': 'SignedUrl'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, logs=None, signed_content=None, url=None):
super(LogCollection, self).__init__()
self.logs = logs
self.signed_content = signed_content
self.url = url
class PackageResourceParameters(Model):
"""
:param version:
:type version: str
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, version=None):
super(PackageResourceParameters, self).__init__()
self.version = version
class PipelineBase(Model):
"""
:param folder: Pipeline folder
:type folder: str
:param id: Pipeline ID
:type id: int
:param name: Pipeline name
:type name: str
:param revision: Revision number
:type revision: int
"""
_attribute_map = {
'folder': {'key': 'folder', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'}
}
def __init__(self, folder=None, id=None, name=None, revision=None):
super(PipelineBase, self).__init__()
self.folder = folder
self.id = id
self.name = name
self.revision = revision
class PipelineConfiguration(Model):
"""
:param type:
:type type: object
"""
_attribute_map = {
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, type=None):
super(PipelineConfiguration, self).__init__()
self.type = type
class PipelineReference(PipelineBase):
"""
A reference to a Pipeline.
:param folder: Pipeline folder
:type folder: str
:param id: Pipeline ID
:type id: int
:param name: Pipeline name
:type name: str
:param revision: Revision number
:type revision: int
:param url:
:type url: str
"""
_attribute_map = {
'folder': {'key': 'folder', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, folder=None, id=None, name=None, revision=None, url=None):
super(PipelineReference, self).__init__(folder=folder, id=id, name=name, revision=revision)
self.url = url
class PipelineResource(Model):
"""
:param pipeline:
:type pipeline: :class:`PipelineReference <azure.devops.v7_1.pipelines.models.PipelineReference>`
:param version:
:type version: str
"""
_attribute_map = {
'pipeline': {'key': 'pipeline', 'type': 'PipelineReference'},
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, pipeline=None, version=None):
super(PipelineResource, self).__init__()
self.pipeline = pipeline
self.version = version
class PipelineResourceParameters(Model):
"""
:param version:
:type version: str
"""
_attribute_map = {
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, version=None):
super(PipelineResourceParameters, self).__init__()
self.version = version
class PreviewRun(Model):
"""
:param final_yaml:
:type final_yaml: str
"""
_attribute_map = {
'final_yaml': {'key': 'finalYaml', 'type': 'str'}
}
def __init__(self, final_yaml=None):
super(PreviewRun, self).__init__()
self.final_yaml = final_yaml
class ReferenceLinks(Model):
"""
The class to represent a collection of REST reference links.
:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""
_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}
def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
class Repository(Model):
"""
:param type:
:type type: object
"""
_attribute_map = {
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, type=None):
super(Repository, self).__init__()
self.type = type
class RepositoryResource(Model):
"""
:param ref_name:
:type ref_name: str
:param repository:
:type repository: :class:`Repository <azure.devops.v7_1.pipelines.models.Repository>`
:param version:
:type version: str
"""
_attribute_map = {
'ref_name': {'key': 'refName', 'type': 'str'},
'repository': {'key': 'repository', 'type': 'Repository'},
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, ref_name=None, repository=None, version=None):
super(RepositoryResource, self).__init__()
self.ref_name = ref_name
self.repository = repository
self.version = version
class RepositoryResourceParameters(Model):
"""
:param ref_name:
:type ref_name: str
:param token: This is the security token to use when connecting to the repository.
:type token: str
:param token_type: Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.
:type token_type: str
:param version:
:type version: str
"""
_attribute_map = {
'ref_name': {'key': 'refName', 'type': 'str'},
'token': {'key': 'token', 'type': 'str'},
'token_type': {'key': 'tokenType', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'}
}
def __init__(self, ref_name=None, token=None, token_type=None, version=None):
super(RepositoryResourceParameters, self).__init__()
self.ref_name = ref_name
self.token = token
self.token_type = token_type
self.version = version
class RunPipelineParameters(Model):
"""
Settings which influence pipeline runs.
:param preview_run: If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.
:type preview_run: bool
:param resources: The resources the run requires.
:type resources: :class:`RunResourcesParameters <azure.devops.v7_1.pipelines.models.RunResourcesParameters>`
:param stages_to_skip:
:type stages_to_skip: list of str
:param template_parameters:
:type template_parameters: dict
:param variables:
:type variables: dict
:param yaml_override: If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.
:type yaml_override: str
"""
_attribute_map = {
'preview_run': {'key': 'previewRun', 'type': 'bool'},
'resources': {'key': 'resources', 'type': 'RunResourcesParameters'},
'stages_to_skip': {'key': 'stagesToSkip', 'type': '[str]'},
'template_parameters': {'key': 'templateParameters', 'type': '{str}'},
'variables': {'key': 'variables', 'type': '{Variable}'},
'yaml_override': {'key': 'yamlOverride', 'type': 'str'}
}
def __init__(self, preview_run=None, resources=None, stages_to_skip=None, template_parameters=None, variables=None, yaml_override=None):
super(RunPipelineParameters, self).__init__()
self.preview_run = preview_run
self.resources = resources
self.stages_to_skip = stages_to_skip
self.template_parameters = template_parameters
self.variables = variables
self.yaml_override = yaml_override
class RunReference(Model):
"""
:param id:
:type id: int
:param name:
:type name: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, id=None, name=None):
super(RunReference, self).__init__()
self.id = id
self.name = name
class RunResources(Model):
"""
:param containers:
:type containers: dict
:param pipelines:
:type pipelines: dict
:param repositories:
:type repositories: dict
"""
_attribute_map = {
'containers': {'key': 'containers', 'type': '{ContainerResource}'},
'pipelines': {'key': 'pipelines', 'type': '{PipelineResource}'},
'repositories': {'key': 'repositories', 'type': '{RepositoryResource}'}
}
def __init__(self, containers=None, pipelines=None, repositories=None):
super(RunResources, self).__init__()
self.containers = containers
self.pipelines = pipelines
self.repositories = repositories
class RunResourcesParameters(Model):
"""
:param builds:
:type builds: dict
:param containers:
:type containers: dict
:param packages:
:type packages: dict
:param pipelines:
:type pipelines: dict
:param repositories:
:type repositories: dict
"""
_attribute_map = {
'builds': {'key': 'builds', 'type': '{BuildResourceParameters}'},
'containers': {'key': 'containers', 'type': '{ContainerResourceParameters}'},
'packages': {'key': 'packages', 'type': '{PackageResourceParameters}'},
'pipelines': {'key': 'pipelines', 'type': '{PipelineResourceParameters}'},
'repositories': {'key': 'repositories', 'type': '{RepositoryResourceParameters}'}
}
def __init__(self, builds=None, containers=None, packages=None, pipelines=None, repositories=None):
super(RunResourcesParameters, self).__init__()
self.builds = builds
self.containers = containers
self.packages = packages
self.pipelines = pipelines
self.repositories = repositories
class SignalRConnection(Model):
"""
:param signed_content:
:type signed_content: :class:`SignedUrl <azure.devops.v7_1.pipelines.models.SignedUrl>`
"""
_attribute_map = {
'signed_content': {'key': 'signedContent', 'type': 'SignedUrl'}
}
def __init__(self, signed_content=None):
super(SignalRConnection, self).__init__()
self.signed_content = signed_content
class SignedUrl(Model):
"""
A signed url allowing limited-time anonymous access to private resources.
:param signature_expires: Timestamp when access expires.
:type signature_expires: datetime
:param url: The URL to allow access to.
:type url: str
"""
_attribute_map = {
'signature_expires': {'key': 'signatureExpires', 'type': 'iso-8601'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, signature_expires=None, url=None):
super(SignedUrl, self).__init__()
self.signature_expires = signature_expires
self.url = url
class Variable(Model):
"""
:param is_secret:
:type is_secret: bool
:param value:
:type value: str
"""
_attribute_map = {
'is_secret': {'key': 'isSecret', 'type': 'bool'},
'value': {'key': 'value', 'type': 'str'}
}
def __init__(self, is_secret=None, value=None):
super(Variable, self).__init__()
self.is_secret = is_secret
self.value = value
class Pipeline(PipelineBase):
"""
Definition of a pipeline.
:param folder: Pipeline folder
:type folder: str
:param id: Pipeline ID
:type id: int
:param name: Pipeline name
:type name: str
:param revision: Revision number
:type revision: int
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.pipelines.models.ReferenceLinks>`
:param configuration:
:type configuration: :class:`PipelineConfiguration <azure.devops.v7_1.pipelines.models.PipelineConfiguration>`
:param url: URL of the pipeline
:type url: str
"""
_attribute_map = {
'folder': {'key': 'folder', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'configuration': {'key': 'configuration', 'type': 'PipelineConfiguration'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, folder=None, id=None, name=None, revision=None, _links=None, configuration=None, url=None):
super(Pipeline, self).__init__(folder=folder, id=id, name=name, revision=revision)
self._links = _links
self.configuration = configuration
self.url = url
class Run(RunReference):
"""
:param id:
:type id: int
:param name:
:type name: str
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.pipelines.models.ReferenceLinks>`
:param created_date:
:type created_date: datetime
:param final_yaml:
:type final_yaml: str
:param finished_date:
:type finished_date: datetime
:param pipeline:
:type pipeline: :class:`PipelineReference <azure.devops.v7_1.pipelines.models.PipelineReference>`
:param resources:
:type resources: :class:`RunResources <azure.devops.v7_1.pipelines.models.RunResources>`
:param result:
:type result: object
:param state:
:type state: object
:param template_parameters:
:type template_parameters: dict
:param url:
:type url: str
:param variables:
:type variables: dict
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'final_yaml': {'key': 'finalYaml', 'type': 'str'},
'finished_date': {'key': 'finishedDate', 'type': 'iso-8601'},
'pipeline': {'key': 'pipeline', 'type': 'PipelineReference'},
'resources': {'key': 'resources', 'type': 'RunResources'},
'result': {'key': 'result', 'type': 'object'},
'state': {'key': 'state', 'type': 'object'},
'template_parameters': {'key': 'templateParameters', 'type': '{object}'},
'url': {'key': 'url', 'type': 'str'},
'variables': {'key': 'variables', 'type': '{Variable}'}
}
def __init__(self, id=None, name=None, _links=None, created_date=None, final_yaml=None, finished_date=None, pipeline=None, resources=None, result=None, state=None, template_parameters=None, url=None, variables=None):
super(Run, self).__init__(id=id, name=name)
self._links = _links
self.created_date = created_date
self.final_yaml = final_yaml
self.finished_date = finished_date
self.pipeline = pipeline
self.resources = resources
self.result = result
self.state = state
self.template_parameters = template_parameters
self.url = url
self.variables = variables
__all__ = [
'Artifact',
'BuildResourceParameters',
'Container',
'ContainerResource',
'ContainerResourceParameters',
'CreatePipelineConfigurationParameters',
'CreatePipelineParameters',
'Log',
'LogCollection',
'PackageResourceParameters',
'PipelineBase',
'PipelineConfiguration',
'PipelineReference',
'PipelineResource',
'PipelineResourceParameters',
'PreviewRun',
'ReferenceLinks',
'Repository',
'RepositoryResource',
'RepositoryResourceParameters',
'RunPipelineParameters',
'RunReference',
'RunResources',
'RunResourcesParameters',
'SignalRConnection',
'SignedUrl',
'Variable',
'Pipeline',
'Run',
]
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/pipelines/models.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/pipelines/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 8852
}
| 342 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...client import Client
from . import models
class TaskClient(Client):
"""Task
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(TaskClient, self).__init__(base_url, creds)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
resource_area_identifier = None
def get_plan_attachments(self, scope_identifier, hub_name, plan_id, type):
"""GetPlanAttachments.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str type:
:rtype: [TaskAttachment]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
response = self._send(http_method='GET',
location_id='eb55e5d6-2f30-4295-b5ed-38da50b1fc52',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('[TaskAttachment]', self._unwrap_collection(response))
def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs):
"""CreateAttachment.
[Preview API]
:param object upload_stream: Stream to upload
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param str record_id:
:param str type:
:param str name:
:rtype: :class:`<TaskAttachment> <azure.devops.v7_1.task.models.TaskAttachment>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
if record_id is not None:
route_values['recordId'] = self._serialize.url('record_id', record_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
if name is not None:
route_values['name'] = self._serialize.url('name', name, 'str')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
content = self._client.stream_upload(upload_stream, callback=callback)
response = self._send(http_method='PUT',
location_id='7898f959-9cdf-4096-b29e-7f293031629e',
version='7.1-preview.1',
route_values=route_values,
content=content,
media_type='application/octet-stream')
return self._deserialize('TaskAttachment', response)
def create_attachment_from_artifact(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, artifact_hash, length):
"""CreateAttachmentFromArtifact.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param str record_id:
:param str type:
:param str name:
:param str artifact_hash:
:param long length:
:rtype: :class:`<TaskAttachment> <azure.devops.v7_1.task.models.TaskAttachment>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
if record_id is not None:
route_values['recordId'] = self._serialize.url('record_id', record_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
if name is not None:
route_values['name'] = self._serialize.url('name', name, 'str')
query_parameters = {}
if artifact_hash is not None:
query_parameters['artifactHash'] = self._serialize.query('artifact_hash', artifact_hash, 'str')
if length is not None:
query_parameters['length'] = self._serialize.query('length', length, 'long')
response = self._send(http_method='PUT',
location_id='7898f959-9cdf-4096-b29e-7f293031629e',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TaskAttachment', response)
def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name):
"""GetAttachment.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param str record_id:
:param str type:
:param str name:
:rtype: :class:`<TaskAttachment> <azure.devops.v7_1.task.models.TaskAttachment>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
if record_id is not None:
route_values['recordId'] = self._serialize.url('record_id', record_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
if name is not None:
route_values['name'] = self._serialize.url('name', name, 'str')
response = self._send(http_method='GET',
location_id='7898f959-9cdf-4096-b29e-7f293031629e',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('TaskAttachment', response)
def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs):
"""GetAttachmentContent.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param str record_id:
:param str type:
:param str name:
:rtype: object
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
if record_id is not None:
route_values['recordId'] = self._serialize.url('record_id', record_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
if name is not None:
route_values['name'] = self._serialize.url('name', name, 'str')
response = self._send(http_method='GET',
location_id='7898f959-9cdf-4096-b29e-7f293031629e',
version='7.1-preview.1',
route_values=route_values,
accept_media_type='application/octet-stream')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
return self._client.stream_download(response, callback=callback)
def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type):
"""GetAttachments.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param str record_id:
:param str type:
:rtype: [TaskAttachment]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
if record_id is not None:
route_values['recordId'] = self._serialize.url('record_id', record_id, 'str')
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
response = self._send(http_method='GET',
location_id='7898f959-9cdf-4096-b29e-7f293031629e',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('[TaskAttachment]', self._unwrap_collection(response))
def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id, **kwargs):
"""AppendLogContent.
[Preview API] Append a log to a task's log. The log should be sent in the body of the request as a TaskLog object stream.
:param object upload_stream: Stream to upload
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id: The ID of the plan.
:param int log_id: The ID of the log.
:rtype: :class:`<TaskLog> <azure.devops.v7_1.task.models.TaskLog>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if log_id is not None:
route_values['logId'] = self._serialize.url('log_id', log_id, 'int')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
content = self._client.stream_upload(upload_stream, callback=callback)
response = self._send(http_method='POST',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='7.1-preview.1',
route_values=route_values,
content=content,
media_type='application/octet-stream')
return self._deserialize('TaskLog', response)
def associate_log(self, scope_identifier, hub_name, plan_id, log_id, serialized_blob_id, line_count):
"""AssociateLog.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param int log_id:
:param str serialized_blob_id:
:param int line_count:
:rtype: :class:`<TaskLog> <azure.devops.v7_1.task.models.TaskLog>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if log_id is not None:
route_values['logId'] = self._serialize.url('log_id', log_id, 'int')
query_parameters = {}
if serialized_blob_id is not None:
query_parameters['serializedBlobId'] = self._serialize.query('serialized_blob_id', serialized_blob_id, 'str')
if line_count is not None:
query_parameters['lineCount'] = self._serialize.query('line_count', line_count, 'int')
response = self._send(http_method='POST',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TaskLog', response)
def create_log(self, log, scope_identifier, hub_name, plan_id):
"""CreateLog.
[Preview API] Create a log and connect it to a pipeline run's execution plan.
:param :class:`<TaskLog> <azure.devops.v7_1.task.models.TaskLog>` log: An object that contains information about log's path.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id: The ID of the plan.
:rtype: :class:`<TaskLog> <azure.devops.v7_1.task.models.TaskLog>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
content = self._serialize.body(log, 'TaskLog')
response = self._send(http_method='POST',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='7.1-preview.1',
route_values=route_values,
content=content)
return self._deserialize('TaskLog', response)
def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None):
"""GetLog.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param int log_id:
:param long start_line:
:param long end_line:
:rtype: [str]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if log_id is not None:
route_values['logId'] = self._serialize.url('log_id', log_id, 'int')
query_parameters = {}
if start_line is not None:
query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long')
if end_line is not None:
query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long')
response = self._send(http_method='GET',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[str]', self._unwrap_collection(response))
def get_logs(self, scope_identifier, hub_name, plan_id):
"""GetLogs.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:rtype: [TaskLog]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
response = self._send(http_method='GET',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('[TaskLog]', self._unwrap_collection(response))
def create_oidc_token(self, claims, scope_identifier, hub_name, plan_id, job_id, service_connection_id):
"""CreateOidcToken.
[Preview API]
:param {str} claims:
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str job_id:
:param str service_connection_id:
:rtype: :class:`<TaskHubOidcToken> <azure.devops.v7_1.task.models.TaskHubOidcToken>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if job_id is not None:
route_values['jobId'] = self._serialize.url('job_id', job_id, 'str')
query_parameters = {}
if service_connection_id is not None:
query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str')
content = self._serialize.body(claims, '{str}')
response = self._send(http_method='POST',
location_id='69a319f4-28c1-4bfd-93e6-ea0ff5c6f1a2',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters,
content=content)
return self._deserialize('TaskHubOidcToken', response)
def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None):
"""GetRecords.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param int change_id:
:rtype: [TimelineRecord]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
query_parameters = {}
if change_id is not None:
query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int')
response = self._send(http_method='GET',
location_id='8893bc5b-35b2-4be7-83cb-99e683551db4',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TimelineRecord]', self._unwrap_collection(response))
def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id):
"""UpdateRecords.
[Preview API] Update timeline records if they already exist, otherwise create new ones for the same timeline.
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v7_1.task.models.VssJsonCollectionWrapper>` records: The array of timeline records to be updated.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id: The ID of the plan.
:param str timeline_id: The ID of the timeline.
:rtype: [TimelineRecord]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
content = self._serialize.body(records, 'VssJsonCollectionWrapper')
response = self._send(http_method='PATCH',
location_id='8893bc5b-35b2-4be7-83cb-99e683551db4',
version='7.1-preview.1',
route_values=route_values,
content=content)
return self._deserialize('[TimelineRecord]', self._unwrap_collection(response))
def create_timeline(self, timeline, scope_identifier, hub_name, plan_id):
"""CreateTimeline.
[Preview API]
:param :class:`<Timeline> <azure.devops.v7_1.task.models.Timeline>` timeline:
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:rtype: :class:`<Timeline> <azure.devops.v7_1.task.models.Timeline>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
content = self._serialize.body(timeline, 'Timeline')
response = self._send(http_method='POST',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='7.1-preview.1',
route_values=route_values,
content=content)
return self._deserialize('Timeline', response)
def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id):
"""DeleteTimeline.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
self._send(http_method='DELETE',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='7.1-preview.1',
route_values=route_values)
def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None):
"""GetTimeline.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:param str timeline_id:
:param int change_id:
:param bool include_records:
:rtype: :class:`<Timeline> <azure.devops.v7_1.task.models.Timeline>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
query_parameters = {}
if change_id is not None:
query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int')
if include_records is not None:
query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool')
response = self._send(http_method='GET',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='7.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Timeline', response)
def get_timelines(self, scope_identifier, hub_name, plan_id):
"""GetTimelines.
[Preview API]
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks"
:param str plan_id:
:rtype: [Timeline]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
response = self._send(http_method='GET',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='7.1-preview.1',
route_values=route_values)
return self._deserialize('[Timeline]', self._unwrap_collection(response))
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/task/task_client.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/task/task_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 13672
}
| 343 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class AccountMyWorkResult(Model):
"""
:param query_size_limit_exceeded: True, when length of WorkItemDetails is same as the limit
:type query_size_limit_exceeded: bool
:param work_item_details: WorkItem Details
:type work_item_details: list of :class:`AccountWorkWorkItemModel <azure.devops.v7_1.work_item_tracking.models.AccountWorkWorkItemModel>`
"""
_attribute_map = {
'query_size_limit_exceeded': {'key': 'querySizeLimitExceeded', 'type': 'bool'},
'work_item_details': {'key': 'workItemDetails', 'type': '[AccountWorkWorkItemModel]'}
}
def __init__(self, query_size_limit_exceeded=None, work_item_details=None):
super(AccountMyWorkResult, self).__init__()
self.query_size_limit_exceeded = query_size_limit_exceeded
self.work_item_details = work_item_details
class AccountRecentActivityWorkItemModelBase(Model):
"""
Represents Work Item Recent Activity
:param activity_date: Date of the last Activity by the user
:type activity_date: datetime
:param activity_type: Type of the activity
:type activity_type: object
:param changed_date: Last changed date of the work item
:type changed_date: datetime
:param id: Work Item Id
:type id: int
:param identity_id: TeamFoundationId of the user this activity belongs to
:type identity_id: str
:param state: State of the work item
:type state: str
:param team_project: Team project the work item belongs to
:type team_project: str
:param title: Title of the work item
:type title: str
:param work_item_type: Type of Work Item
:type work_item_type: str
"""
_attribute_map = {
'activity_date': {'key': 'activityDate', 'type': 'iso-8601'},
'activity_type': {'key': 'activityType', 'type': 'object'},
'changed_date': {'key': 'changedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'int'},
'identity_id': {'key': 'identityId', 'type': 'str'},
'state': {'key': 'state', 'type': 'str'},
'team_project': {'key': 'teamProject', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'work_item_type': {'key': 'workItemType', 'type': 'str'}
}
def __init__(self, activity_date=None, activity_type=None, changed_date=None, id=None, identity_id=None, state=None, team_project=None, title=None, work_item_type=None):
super(AccountRecentActivityWorkItemModelBase, self).__init__()
self.activity_date = activity_date
self.activity_type = activity_type
self.changed_date = changed_date
self.id = id
self.identity_id = identity_id
self.state = state
self.team_project = team_project
self.title = title
self.work_item_type = work_item_type
class AccountRecentMentionWorkItemModel(Model):
"""
Represents Recent Mention Work Item
:param assigned_to: Assigned To
:type assigned_to: str
:param id: Work Item Id
:type id: int
:param mentioned_date_field: Latest date that the user were mentioned
:type mentioned_date_field: datetime
:param state: State of the work item
:type state: str
:param team_project: Team project the work item belongs to
:type team_project: str
:param title: Title of the work item
:type title: str
:param work_item_type: Type of Work Item
:type work_item_type: str
"""
_attribute_map = {
'assigned_to': {'key': 'assignedTo', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'mentioned_date_field': {'key': 'mentionedDateField', 'type': 'iso-8601'},
'state': {'key': 'state', 'type': 'str'},
'team_project': {'key': 'teamProject', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'work_item_type': {'key': 'workItemType', 'type': 'str'}
}
def __init__(self, assigned_to=None, id=None, mentioned_date_field=None, state=None, team_project=None, title=None, work_item_type=None):
super(AccountRecentMentionWorkItemModel, self).__init__()
self.assigned_to = assigned_to
self.id = id
self.mentioned_date_field = mentioned_date_field
self.state = state
self.team_project = team_project
self.title = title
self.work_item_type = work_item_type
class AccountWorkWorkItemModel(Model):
"""
:param assigned_to:
:type assigned_to: str
:param changed_date:
:type changed_date: datetime
:param id:
:type id: int
:param state:
:type state: str
:param team_project:
:type team_project: str
:param title:
:type title: str
:param work_item_type:
:type work_item_type: str
"""
_attribute_map = {
'assigned_to': {'key': 'assignedTo', 'type': 'str'},
'changed_date': {'key': 'changedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'int'},
'state': {'key': 'state', 'type': 'str'},
'team_project': {'key': 'teamProject', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'work_item_type': {'key': 'workItemType', 'type': 'str'}
}
def __init__(self, assigned_to=None, changed_date=None, id=None, state=None, team_project=None, title=None, work_item_type=None):
super(AccountWorkWorkItemModel, self).__init__()
self.assigned_to = assigned_to
self.changed_date = changed_date
self.id = id
self.state = state
self.team_project = team_project
self.title = title
self.work_item_type = work_item_type
class ArtifactUriQuery(Model):
"""
Contains criteria for querying work items based on artifact URI.
:param artifact_uris: List of artifact URIs to use for querying work items.
:type artifact_uris: list of str
"""
_attribute_map = {
'artifact_uris': {'key': 'artifactUris', 'type': '[str]'}
}
def __init__(self, artifact_uris=None):
super(ArtifactUriQuery, self).__init__()
self.artifact_uris = artifact_uris
class ArtifactUriQueryResult(Model):
"""
Defines result of artifact URI query on work items. Contains mapping of work item IDs to artifact URI.
:param artifact_uris_query_result: A Dictionary that maps a list of work item references to the given list of artifact URI.
:type artifact_uris_query_result: dict
"""
_attribute_map = {
'artifact_uris_query_result': {'key': 'artifactUrisQueryResult', 'type': '{[WorkItemReference]}'}
}
def __init__(self, artifact_uris_query_result=None):
super(ArtifactUriQueryResult, self).__init__()
self.artifact_uris_query_result = artifact_uris_query_result
class AttachmentReference(Model):
"""
:param id:
:type id: str
:param url:
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, url=None):
super(AttachmentReference, self).__init__()
self.id = id
self.url = url
class CommentCreate(Model):
"""
Represents a request to create a work item comment.
:param text: The text of the comment.
:type text: str
"""
_attribute_map = {
'text': {'key': 'text', 'type': 'str'}
}
def __init__(self, text=None):
super(CommentCreate, self).__init__()
self.text = text
class CommentUpdate(Model):
"""
Represents a request to update a work item comment.
:param text: The updated text of the comment.
:type text: str
"""
_attribute_map = {
'text': {'key': 'text', 'type': 'str'}
}
def __init__(self, text=None):
super(CommentUpdate, self).__init__()
self.text = text
class EmailRecipients(Model):
"""
:param email_addresses: Plaintext email addresses.
:type email_addresses: list of str
:param tf_ids: TfIds
:type tf_ids: list of str
:param unresolved_entity_ids: Unresolved entity ids
:type unresolved_entity_ids: list of str
"""
_attribute_map = {
'email_addresses': {'key': 'emailAddresses', 'type': '[str]'},
'tf_ids': {'key': 'tfIds', 'type': '[str]'},
'unresolved_entity_ids': {'key': 'unresolvedEntityIds', 'type': '[str]'}
}
def __init__(self, email_addresses=None, tf_ids=None, unresolved_entity_ids=None):
super(EmailRecipients, self).__init__()
self.email_addresses = email_addresses
self.tf_ids = tf_ids
self.unresolved_entity_ids = unresolved_entity_ids
class ExternalDeployment(Model):
"""
:param artifact_id:
:type artifact_id: str
:param created_by:
:type created_by: str
:param description:
:type description: str
:param display_name:
:type display_name: str
:param environment:
:type environment: :class:`ExternalEnvironment <azure.devops.v7_1.work_item_tracking.models.ExternalEnvironment>`
:param group:
:type group: str
:param pipeline:
:type pipeline: :class:`ExternalPipeline <azure.devops.v7_1.work_item_tracking.models.ExternalPipeline>`
:param related_work_item_ids:
:type related_work_item_ids: list of int
:param run_id:
:type run_id: int
:param sequence_number:
:type sequence_number: int
:param status:
:type status: str
:param status_date:
:type status_date: datetime
:param url:
:type url: str
"""
_attribute_map = {
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'created_by': {'key': 'createdBy', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'environment': {'key': 'environment', 'type': 'ExternalEnvironment'},
'group': {'key': 'group', 'type': 'str'},
'pipeline': {'key': 'pipeline', 'type': 'ExternalPipeline'},
'related_work_item_ids': {'key': 'relatedWorkItemIds', 'type': '[int]'},
'run_id': {'key': 'runId', 'type': 'int'},
'sequence_number': {'key': 'sequenceNumber', 'type': 'int'},
'status': {'key': 'status', 'type': 'str'},
'status_date': {'key': 'statusDate', 'type': 'iso-8601'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, artifact_id=None, created_by=None, description=None, display_name=None, environment=None, group=None, pipeline=None, related_work_item_ids=None, run_id=None, sequence_number=None, status=None, status_date=None, url=None):
super(ExternalDeployment, self).__init__()
self.artifact_id = artifact_id
self.created_by = created_by
self.description = description
self.display_name = display_name
self.environment = environment
self.group = group
self.pipeline = pipeline
self.related_work_item_ids = related_work_item_ids
self.run_id = run_id
self.sequence_number = sequence_number
self.status = status
self.status_date = status_date
self.url = url
class ExternalEnvironment(Model):
"""
:param display_name:
:type display_name: str
:param id:
:type id: int
:param type:
:type type: str
"""
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'type': {'key': 'type', 'type': 'str'}
}
def __init__(self, display_name=None, id=None, type=None):
super(ExternalEnvironment, self).__init__()
self.display_name = display_name
self.id = id
self.type = type
class ExternalPipeline(Model):
"""
:param display_name:
:type display_name: str
:param id:
:type id: int
:param url:
:type url: str
"""
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, display_name=None, id=None, url=None):
super(ExternalPipeline, self).__init__()
self.display_name = display_name
self.id = id
self.url = url
class FieldUpdate(Model):
"""
Describes an update request for a work item field.
:param is_deleted: Indicates whether the user wants to restore the field.
:type is_deleted: bool
:param is_locked: Indicates whether the user wants to lock the field.
:type is_locked: bool
"""
_attribute_map = {
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'is_locked': {'key': 'isLocked', 'type': 'bool'}
}
def __init__(self, is_deleted=None, is_locked=None):
super(FieldUpdate, self).__init__()
self.is_deleted = is_deleted
self.is_locked = is_locked
class GitHubConnectionModel(Model):
"""
Describes Github connection.
:param authorization_type: Github connection authorization type (f. e. PAT, OAuth)
:type authorization_type: str
:param created_by: Github connection created by
:type created_by: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param id: Github connection id
:type id: str
:param is_connection_valid: Whether current Github connection is valid or not
:type is_connection_valid: bool
:param name: Github connection name (should contain organization/user name)
:type name: str
"""
_attribute_map = {
'authorization_type': {'key': 'authorizationType', 'type': 'str'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'id': {'key': 'id', 'type': 'str'},
'is_connection_valid': {'key': 'isConnectionValid', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, authorization_type=None, created_by=None, id=None, is_connection_valid=None, name=None):
super(GitHubConnectionModel, self).__init__()
self.authorization_type = authorization_type
self.created_by = created_by
self.id = id
self.is_connection_valid = is_connection_valid
self.name = name
class GitHubConnectionRepoModel(Model):
"""
Describes Github connection's repo.
:param error_message: Error message
:type error_message: str
:param git_hub_repository_url: Repository web url
:type git_hub_repository_url: str
"""
_attribute_map = {
'error_message': {'key': 'errorMessage', 'type': 'str'},
'git_hub_repository_url': {'key': 'gitHubRepositoryUrl', 'type': 'str'}
}
def __init__(self, error_message=None, git_hub_repository_url=None):
super(GitHubConnectionRepoModel, self).__init__()
self.error_message = error_message
self.git_hub_repository_url = git_hub_repository_url
class GitHubConnectionReposBatchRequest(Model):
"""
Describes Github connection's repo bulk request
:param git_hub_repository_urls: Requested repos urls
:type git_hub_repository_urls: list of :class:`GitHubConnectionRepoModel <azure.devops.v7_1.work_item_tracking.models.GitHubConnectionRepoModel>`
:param operation_type: Operation type (f. e. add, remove)
:type operation_type: str
"""
_attribute_map = {
'git_hub_repository_urls': {'key': 'gitHubRepositoryUrls', 'type': '[GitHubConnectionRepoModel]'},
'operation_type': {'key': 'operationType', 'type': 'str'}
}
def __init__(self, git_hub_repository_urls=None, operation_type=None):
super(GitHubConnectionReposBatchRequest, self).__init__()
self.git_hub_repository_urls = git_hub_repository_urls
self.operation_type = operation_type
class GraphSubjectBase(Model):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None):
super(GraphSubjectBase, self).__init__()
self._links = _links
self.descriptor = descriptor
self.display_name = display_name
self.url = url
class IdentityRef(GraphSubjectBase):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
:type directory_alias: str
:param id:
:type id: str
:param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
:type image_url: str
:param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
:type inactive: bool
:param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
:type is_aad_identity: bool
:param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
:type is_container: bool
:param is_deleted_in_origin:
:type is_deleted_in_origin: bool
:param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef
:type profile_url: str
:param unique_name: Deprecated - use Domain+PrincipalName instead
:type unique_name: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None):
super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url)
self.directory_alias = directory_alias
self.id = id
self.image_url = image_url
self.inactive = inactive
self.is_aad_identity = is_aad_identity
self.is_container = is_container
self.is_deleted_in_origin = is_deleted_in_origin
self.profile_url = profile_url
self.unique_name = unique_name
class IdentityReference(IdentityRef):
"""
Describes a reference to an identity.
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
:type directory_alias: str
:param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
:type image_url: str
:param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
:type inactive: bool
:param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
:type is_aad_identity: bool
:param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
:type is_container: bool
:param is_deleted_in_origin:
:type is_deleted_in_origin: bool
:param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef
:type profile_url: str
:param unique_name: Deprecated - use Domain+PrincipalName instead
:type unique_name: str
:param id:
:type id: str
:param name: Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version
:type name: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, id=None, name=None):
super(IdentityReference, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, is_deleted_in_origin=is_deleted_in_origin, profile_url=profile_url, unique_name=unique_name)
self.id = id
self.name = name
class JsonPatchOperation(Model):
"""
The JSON model for a JSON Patch operation
:param from_: The path to copy from for the Move/Copy operation.
:type from_: str
:param op: The patch operation
:type op: object
:param path: The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).
:type path: str
:param value: The value for the operation. This is either a primitive or a JToken.
:type value: object
"""
_attribute_map = {
'from_': {'key': 'from', 'type': 'str'},
'op': {'key': 'op', 'type': 'object'},
'path': {'key': 'path', 'type': 'str'},
'value': {'key': 'value', 'type': 'object'}
}
def __init__(self, from_=None, op=None, path=None, value=None):
super(JsonPatchOperation, self).__init__()
self.from_ = from_
self.op = op
self.path = path
self.value = value
class Link(Model):
"""
Link description.
:param attributes: Collection of link attributes.
:type attributes: dict
:param rel: Relation type.
:type rel: str
:param url: Link url.
:type url: str
"""
_attribute_map = {
'attributes': {'key': 'attributes', 'type': '{object}'},
'rel': {'key': 'rel', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, attributes=None, rel=None, url=None):
super(Link, self).__init__()
self.attributes = attributes
self.rel = rel
self.url = url
class MailMessage(Model):
"""
:param body: The mail body in HTML format.
:type body: str
:param cc: CC recipients.
:type cc: :class:`EmailRecipients <azure.devops.v7_1.work_item_tracking.models.EmailRecipients>`
:param in_reply_to: The in-reply-to header value
:type in_reply_to: str
:param message_id: The Message Id value
:type message_id: str
:param reply_to: Reply To recipients.
:type reply_to: :class:`EmailRecipients <azure.devops.v7_1.work_item_tracking.models.EmailRecipients>`
:param subject: The mail subject.
:type subject: str
:param to: To recipients
:type to: :class:`EmailRecipients <azure.devops.v7_1.work_item_tracking.models.EmailRecipients>`
"""
_attribute_map = {
'body': {'key': 'body', 'type': 'str'},
'cc': {'key': 'cc', 'type': 'EmailRecipients'},
'in_reply_to': {'key': 'inReplyTo', 'type': 'str'},
'message_id': {'key': 'messageId', 'type': 'str'},
'reply_to': {'key': 'replyTo', 'type': 'EmailRecipients'},
'subject': {'key': 'subject', 'type': 'str'},
'to': {'key': 'to', 'type': 'EmailRecipients'}
}
def __init__(self, body=None, cc=None, in_reply_to=None, message_id=None, reply_to=None, subject=None, to=None):
super(MailMessage, self).__init__()
self.body = body
self.cc = cc
self.in_reply_to = in_reply_to
self.message_id = message_id
self.reply_to = reply_to
self.subject = subject
self.to = to
class ProcessIdModel(Model):
"""
Stores process ID.
:param type_id: The ID of the process.
:type type_id: str
"""
_attribute_map = {
'type_id': {'key': 'typeId', 'type': 'str'}
}
def __init__(self, type_id=None):
super(ProcessIdModel, self).__init__()
self.type_id = type_id
class ProcessMigrationResultModel(Model):
"""
Stores project ID and its process ID.
:param process_id: The ID of the process.
:type process_id: str
:param project_id: The ID of the project.
:type project_id: str
"""
_attribute_map = {
'process_id': {'key': 'processId', 'type': 'str'},
'project_id': {'key': 'projectId', 'type': 'str'}
}
def __init__(self, process_id=None, project_id=None):
super(ProcessMigrationResultModel, self).__init__()
self.process_id = process_id
self.project_id = project_id
class ProjectWorkItemStateColors(Model):
"""
Project work item type state colors
:param project_name: Project name
:type project_name: str
:param work_item_type_state_colors: State colors for all work item type in a project
:type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors <azure.devops.v7_1.work_item_tracking.models.WorkItemTypeStateColors>`
"""
_attribute_map = {
'project_name': {'key': 'projectName', 'type': 'str'},
'work_item_type_state_colors': {'key': 'workItemTypeStateColors', 'type': '[WorkItemTypeStateColors]'}
}
def __init__(self, project_name=None, work_item_type_state_colors=None):
super(ProjectWorkItemStateColors, self).__init__()
self.project_name = project_name
self.work_item_type_state_colors = work_item_type_state_colors
class ProvisioningResult(Model):
"""
Result of an update work item type XML update operation.
:param provisioning_import_events: Details about of the provisioning import events.
:type provisioning_import_events: list of str
"""
_attribute_map = {
'provisioning_import_events': {'key': 'provisioningImportEvents', 'type': '[str]'}
}
def __init__(self, provisioning_import_events=None):
super(ProvisioningResult, self).__init__()
self.provisioning_import_events = provisioning_import_events
class QueryBatchGetRequest(Model):
"""
Describes a request to get a list of queries
:param expand: The expand parameters for queries. Possible options are { None, Wiql, Clauses, All, Minimal }
:type expand: object
:param error_policy: The flag to control error policy in a query batch request. Possible options are { Fail, Omit }.
:type error_policy: object
:param ids: The requested query ids
:type ids: list of str
"""
_attribute_map = {
'expand': {'key': '$expand', 'type': 'object'},
'error_policy': {'key': 'errorPolicy', 'type': 'object'},
'ids': {'key': 'ids', 'type': '[str]'}
}
def __init__(self, expand=None, error_policy=None, ids=None):
super(QueryBatchGetRequest, self).__init__()
self.expand = expand
self.error_policy = error_policy
self.ids = ids
class QueryHierarchyItemsResult(Model):
"""
:param count: The count of items.
:type count: int
:param has_more: Indicates if the max return limit was hit but there are still more items
:type has_more: bool
:param value: The list of items
:type value: list of :class:`QueryHierarchyItem <azure.devops.v7_1.work_item_tracking.models.QueryHierarchyItem>`
"""
_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'has_more': {'key': 'hasMore', 'type': 'bool'},
'value': {'key': 'value', 'type': '[QueryHierarchyItem]'}
}
def __init__(self, count=None, has_more=None, value=None):
super(QueryHierarchyItemsResult, self).__init__()
self.count = count
self.has_more = has_more
self.value = value
class ReferenceLinks(Model):
"""
The class to represent a collection of REST reference links.
:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""
_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}
def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
class ReportingWorkItemRevisionsFilter(Model):
"""
The class represents the reporting work item revision filer.
:param fields: A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
:type fields: list of str
:param include_deleted: Include deleted work item in the result.
:type include_deleted: bool
:param include_identity_ref: Return an identity reference instead of a string value for identity fields.
:type include_identity_ref: bool
:param include_latest_only: Include only the latest version of a work item, skipping over all previous revisions of the work item.
:type include_latest_only: bool
:param include_tag_ref: Include tag reference instead of string value for System.Tags field
:type include_tag_ref: bool
:param types: A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
:type types: list of str
"""
_attribute_map = {
'fields': {'key': 'fields', 'type': '[str]'},
'include_deleted': {'key': 'includeDeleted', 'type': 'bool'},
'include_identity_ref': {'key': 'includeIdentityRef', 'type': 'bool'},
'include_latest_only': {'key': 'includeLatestOnly', 'type': 'bool'},
'include_tag_ref': {'key': 'includeTagRef', 'type': 'bool'},
'types': {'key': 'types', 'type': '[str]'}
}
def __init__(self, fields=None, include_deleted=None, include_identity_ref=None, include_latest_only=None, include_tag_ref=None, types=None):
super(ReportingWorkItemRevisionsFilter, self).__init__()
self.fields = fields
self.include_deleted = include_deleted
self.include_identity_ref = include_identity_ref
self.include_latest_only = include_latest_only
self.include_tag_ref = include_tag_ref
self.types = types
class SendMailBody(Model):
"""
:param fields:
:type fields: list of str
:param ids:
:type ids: list of int
:param message:
:type message: :class:`MailMessage <azure.devops.v7_1.work_item_tracking.models.MailMessage>`
:param persistence_id:
:type persistence_id: str
:param project_id:
:type project_id: str
:param sort_fields:
:type sort_fields: list of str
:param temp_query_id:
:type temp_query_id: str
:param wiql:
:type wiql: str
"""
_attribute_map = {
'fields': {'key': 'fields', 'type': '[str]'},
'ids': {'key': 'ids', 'type': '[int]'},
'message': {'key': 'message', 'type': 'MailMessage'},
'persistence_id': {'key': 'persistenceId', 'type': 'str'},
'project_id': {'key': 'projectId', 'type': 'str'},
'sort_fields': {'key': 'sortFields', 'type': '[str]'},
'temp_query_id': {'key': 'tempQueryId', 'type': 'str'},
'wiql': {'key': 'wiql', 'type': 'str'}
}
def __init__(self, fields=None, ids=None, message=None, persistence_id=None, project_id=None, sort_fields=None, temp_query_id=None, wiql=None):
super(SendMailBody, self).__init__()
self.fields = fields
self.ids = ids
self.message = message
self.persistence_id = persistence_id
self.project_id = project_id
self.sort_fields = sort_fields
self.temp_query_id = temp_query_id
self.wiql = wiql
class StreamedBatch(Model):
"""
The class describes reporting work item revision batch.
:param continuation_token: ContinuationToken acts as a waterMark. Used while querying large results.
:type continuation_token: str
:param is_last_batch: Returns 'true' if it's last batch, 'false' otherwise.
:type is_last_batch: bool
:param next_link: The next link for the work item.
:type next_link: str
:param values: Values such as rel, sourceId, TargetId, ChangedDate, isActive.
:type values: list of object
"""
_attribute_map = {
'continuation_token': {'key': 'continuationToken', 'type': 'str'},
'is_last_batch': {'key': 'isLastBatch', 'type': 'bool'},
'next_link': {'key': 'nextLink', 'type': 'str'},
'values': {'key': 'values', 'type': '[object]'}
}
def __init__(self, continuation_token=None, is_last_batch=None, next_link=None, values=None):
super(StreamedBatch, self).__init__()
self.continuation_token = continuation_token
self.is_last_batch = is_last_batch
self.next_link = next_link
self.values = values
class TeamContext(Model):
"""
The Team Context for an operation.
:param project: The team project Id or name. Ignored if ProjectId is set.
:type project: str
:param project_id: The Team Project ID. Required if Project is not set.
:type project_id: str
:param team: The Team Id or name. Ignored if TeamId is set.
:type team: str
:param team_id: The Team Id
:type team_id: str
"""
_attribute_map = {
'project': {'key': 'project', 'type': 'str'},
'project_id': {'key': 'projectId', 'type': 'str'},
'team': {'key': 'team', 'type': 'str'},
'team_id': {'key': 'teamId', 'type': 'str'}
}
def __init__(self, project=None, project_id=None, team=None, team_id=None):
super(TeamContext, self).__init__()
self.project = project
self.project_id = project_id
self.team = team
self.team_id = team_id
class TemporaryQueryResponseModel(Model):
"""
The result of a temporary query creation.
:param id: The id of the temporary query item.
:type id: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'}
}
def __init__(self, id=None):
super(TemporaryQueryResponseModel, self).__init__()
self.id = id
class UpdateWorkItemField(Model):
"""
Describes an update request for a work item field.
:param is_deleted: Indicates whether the user wants to restore the field.
:type is_deleted: bool
"""
_attribute_map = {
'is_deleted': {'key': 'isDeleted', 'type': 'bool'}
}
def __init__(self, is_deleted=None):
super(UpdateWorkItemField, self).__init__()
self.is_deleted = is_deleted
class Wiql(Model):
"""
A WIQL query
:param query: The text of the WIQL query
:type query: str
"""
_attribute_map = {
'query': {'key': 'query', 'type': 'str'}
}
def __init__(self, query=None):
super(Wiql, self).__init__()
self.query = query
class WorkArtifactLink(Model):
"""
A work artifact link describes an outbound artifact link type.
:param artifact_type: Target artifact type.
:type artifact_type: str
:param link_type: Outbound link type.
:type link_type: str
:param tool_type: Target tool type.
:type tool_type: str
"""
_attribute_map = {
'artifact_type': {'key': 'artifactType', 'type': 'str'},
'link_type': {'key': 'linkType', 'type': 'str'},
'tool_type': {'key': 'toolType', 'type': 'str'}
}
def __init__(self, artifact_type=None, link_type=None, tool_type=None):
super(WorkArtifactLink, self).__init__()
self.artifact_type = artifact_type
self.link_type = link_type
self.tool_type = tool_type
class WorkItemBatchGetRequest(Model):
"""
Describes a request to get a set of work items
:param expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }
:type expand: object
:param as_of: AsOf UTC date time string
:type as_of: datetime
:param error_policy: The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
:type error_policy: object
:param fields: The requested fields
:type fields: list of str
:param ids: The requested work item ids
:type ids: list of int
"""
_attribute_map = {
'expand': {'key': '$expand', 'type': 'object'},
'as_of': {'key': 'asOf', 'type': 'iso-8601'},
'error_policy': {'key': 'errorPolicy', 'type': 'object'},
'fields': {'key': 'fields', 'type': '[str]'},
'ids': {'key': 'ids', 'type': '[int]'}
}
def __init__(self, expand=None, as_of=None, error_policy=None, fields=None, ids=None):
super(WorkItemBatchGetRequest, self).__init__()
self.expand = expand
self.as_of = as_of
self.error_policy = error_policy
self.fields = fields
self.ids = ids
class WorkItemDeleteBatch(Model):
"""
Describes response to delete a set of work items.
:param results: List of results for each work item
:type results: list of :class:`WorkItemDelete <azure.devops.v7_1.work_item_tracking.models.WorkItemDelete>`
"""
_attribute_map = {
'results': {'key': 'results', 'type': '[WorkItemDelete]'}
}
def __init__(self, results=None):
super(WorkItemDeleteBatch, self).__init__()
self.results = results
class WorkItemDeleteBatchRequest(Model):
"""
Describes a request to delete a set of work items
:param destroy: Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
:type destroy: bool
:param ids: The requested work item ids
:type ids: list of int
:param skip_notifications: Optional parameter, if set to true, notifications will be disabled.
:type skip_notifications: bool
"""
_attribute_map = {
'destroy': {'key': 'destroy', 'type': 'bool'},
'ids': {'key': 'ids', 'type': '[int]'},
'skip_notifications': {'key': 'skipNotifications', 'type': 'bool'}
}
def __init__(self, destroy=None, ids=None, skip_notifications=None):
super(WorkItemDeleteBatchRequest, self).__init__()
self.destroy = destroy
self.ids = ids
self.skip_notifications = skip_notifications
class WorkItemDeleteReference(Model):
"""
Reference to a deleted work item.
:param code: The HTTP status code for work item operation in a batch request.
:type code: int
:param deleted_by: The user who deleted the work item type.
:type deleted_by: str
:param deleted_date: The work item deletion date.
:type deleted_date: str
:param id: Work item ID.
:type id: int
:param message: The exception message for work item operation in a batch request.
:type message: str
:param name: Name or title of the work item.
:type name: str
:param project: Parent project of the deleted work item.
:type project: str
:param type: Type of work item.
:type type: str
:param url: REST API URL of the resource
:type url: str
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'int'},
'deleted_by': {'key': 'deletedBy', 'type': 'str'},
'deleted_date': {'key': 'deletedDate', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'message': {'key': 'message', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'project': {'key': 'project', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, code=None, deleted_by=None, deleted_date=None, id=None, message=None, name=None, project=None, type=None, url=None):
super(WorkItemDeleteReference, self).__init__()
self.code = code
self.deleted_by = deleted_by
self.deleted_date = deleted_date
self.id = id
self.message = message
self.name = name
self.project = project
self.type = type
self.url = url
class WorkItemDeleteShallowReference(Model):
"""
Shallow Reference to a deleted work item.
:param id: Work item ID.
:type id: int
:param url: REST API URL of the resource
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, url=None):
super(WorkItemDeleteShallowReference, self).__init__()
self.id = id
self.url = url
class WorkItemDeleteUpdate(Model):
"""
Describes an update request for a deleted work item.
:param is_deleted: Sets a value indicating whether this work item is deleted.
:type is_deleted: bool
"""
_attribute_map = {
'is_deleted': {'key': 'isDeleted', 'type': 'bool'}
}
def __init__(self, is_deleted=None):
super(WorkItemDeleteUpdate, self).__init__()
self.is_deleted = is_deleted
class WorkItemFieldAllowedValues(Model):
"""
Describes the list of allowed values of the field.
:param allowed_values: The list of field allowed values.
:type allowed_values: list of str
:param field_name: Name of the field.
:type field_name: str
"""
_attribute_map = {
'allowed_values': {'key': 'allowedValues', 'type': '[str]'},
'field_name': {'key': 'fieldName', 'type': 'str'}
}
def __init__(self, allowed_values=None, field_name=None):
super(WorkItemFieldAllowedValues, self).__init__()
self.allowed_values = allowed_values
self.field_name = field_name
class WorkItemFieldOperation(Model):
"""
Describes a work item field operation.
:param name: Friendly name of the operation.
:type name: str
:param reference_name: Reference name of the operation.
:type reference_name: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'}
}
def __init__(self, name=None, reference_name=None):
super(WorkItemFieldOperation, self).__init__()
self.name = name
self.reference_name = reference_name
class WorkItemFieldReference(Model):
"""
Reference to a field in a work item
:param name: The friendly name of the field.
:type name: str
:param reference_name: The reference name of the field.
:type reference_name: str
:param url: The REST URL of the resource.
:type url: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, name=None, reference_name=None, url=None):
super(WorkItemFieldReference, self).__init__()
self.name = name
self.reference_name = reference_name
self.url = url
class WorkItemFieldUpdate(Model):
"""
Describes an update to a work item field.
:param new_value: The new value of the field.
:type new_value: object
:param old_value: The old value of the field.
:type old_value: object
"""
_attribute_map = {
'new_value': {'key': 'newValue', 'type': 'object'},
'old_value': {'key': 'oldValue', 'type': 'object'}
}
def __init__(self, new_value=None, old_value=None):
super(WorkItemFieldUpdate, self).__init__()
self.new_value = new_value
self.old_value = old_value
class WorkItemIcon(Model):
"""
Reference to a work item icon.
:param id: The identifier of the icon.
:type id: str
:param url: The REST URL of the resource.
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, url=None):
super(WorkItemIcon, self).__init__()
self.id = id
self.url = url
class WorkItemLink(Model):
"""
A link between two work items.
:param rel: The type of link.
:type rel: str
:param source: The source work item.
:type source: :class:`WorkItemReference <azure.devops.v7_1.work_item_tracking.models.WorkItemReference>`
:param target: The target work item.
:type target: :class:`WorkItemReference <azure.devops.v7_1.work_item_tracking.models.WorkItemReference>`
"""
_attribute_map = {
'rel': {'key': 'rel', 'type': 'str'},
'source': {'key': 'source', 'type': 'WorkItemReference'},
'target': {'key': 'target', 'type': 'WorkItemReference'}
}
def __init__(self, rel=None, source=None, target=None):
super(WorkItemLink, self).__init__()
self.rel = rel
self.source = source
self.target = target
class WorkItemNextStateOnTransition(Model):
"""
Describes the next state for a work item.
:param error_code: Error code if there is no next state transition possible.
:type error_code: str
:param id: Work item ID.
:type id: int
:param message: Error message if there is no next state transition possible.
:type message: str
:param state_on_transition: Name of the next state on transition.
:type state_on_transition: str
"""
_attribute_map = {
'error_code': {'key': 'errorCode', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'message': {'key': 'message', 'type': 'str'},
'state_on_transition': {'key': 'stateOnTransition', 'type': 'str'}
}
def __init__(self, error_code=None, id=None, message=None, state_on_transition=None):
super(WorkItemNextStateOnTransition, self).__init__()
self.error_code = error_code
self.id = id
self.message = message
self.state_on_transition = state_on_transition
class WorkItemQueryClause(Model):
"""
Represents a clause in a work item query. This shows the structure of a work item query.
:param clauses: Child clauses if the current clause is a logical operator
:type clauses: list of :class:`WorkItemQueryClause <azure.devops.v7_1.work_item_tracking.models.WorkItemQueryClause>`
:param field: Field associated with condition
:type field: :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param field_value: Right side of the condition when a field to field comparison
:type field_value: :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param is_field_value: Determines if this is a field to field comparison
:type is_field_value: bool
:param logical_operator: Logical operator separating the condition clause
:type logical_operator: object
:param operator: The field operator
:type operator: :class:`WorkItemFieldOperation <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldOperation>`
:param value: Right side of the condition when a field to value comparison
:type value: str
"""
_attribute_map = {
'clauses': {'key': 'clauses', 'type': '[WorkItemQueryClause]'},
'field': {'key': 'field', 'type': 'WorkItemFieldReference'},
'field_value': {'key': 'fieldValue', 'type': 'WorkItemFieldReference'},
'is_field_value': {'key': 'isFieldValue', 'type': 'bool'},
'logical_operator': {'key': 'logicalOperator', 'type': 'object'},
'operator': {'key': 'operator', 'type': 'WorkItemFieldOperation'},
'value': {'key': 'value', 'type': 'str'}
}
def __init__(self, clauses=None, field=None, field_value=None, is_field_value=None, logical_operator=None, operator=None, value=None):
super(WorkItemQueryClause, self).__init__()
self.clauses = clauses
self.field = field
self.field_value = field_value
self.is_field_value = is_field_value
self.logical_operator = logical_operator
self.operator = operator
self.value = value
class WorkItemQueryResult(Model):
"""
The result of a work item query.
:param as_of: The date the query was run in the context of.
:type as_of: datetime
:param columns: The columns of the query.
:type columns: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param query_result_type: The result type
:type query_result_type: object
:param query_type: The type of the query
:type query_type: object
:param sort_columns: The sort columns of the query.
:type sort_columns: list of :class:`WorkItemQuerySortColumn <azure.devops.v7_1.work_item_tracking.models.WorkItemQuerySortColumn>`
:param work_item_relations: The work item links returned by the query.
:type work_item_relations: list of :class:`WorkItemLink <azure.devops.v7_1.work_item_tracking.models.WorkItemLink>`
:param work_items: The work items returned by the query.
:type work_items: list of :class:`WorkItemReference <azure.devops.v7_1.work_item_tracking.models.WorkItemReference>`
"""
_attribute_map = {
'as_of': {'key': 'asOf', 'type': 'iso-8601'},
'columns': {'key': 'columns', 'type': '[WorkItemFieldReference]'},
'query_result_type': {'key': 'queryResultType', 'type': 'object'},
'query_type': {'key': 'queryType', 'type': 'object'},
'sort_columns': {'key': 'sortColumns', 'type': '[WorkItemQuerySortColumn]'},
'work_item_relations': {'key': 'workItemRelations', 'type': '[WorkItemLink]'},
'work_items': {'key': 'workItems', 'type': '[WorkItemReference]'}
}
def __init__(self, as_of=None, columns=None, query_result_type=None, query_type=None, sort_columns=None, work_item_relations=None, work_items=None):
super(WorkItemQueryResult, self).__init__()
self.as_of = as_of
self.columns = columns
self.query_result_type = query_result_type
self.query_type = query_type
self.sort_columns = sort_columns
self.work_item_relations = work_item_relations
self.work_items = work_items
class WorkItemQuerySortColumn(Model):
"""
A sort column.
:param descending: The direction to sort by.
:type descending: bool
:param field: A work item field.
:type field: :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
"""
_attribute_map = {
'descending': {'key': 'descending', 'type': 'bool'},
'field': {'key': 'field', 'type': 'WorkItemFieldReference'}
}
def __init__(self, descending=None, field=None):
super(WorkItemQuerySortColumn, self).__init__()
self.descending = descending
self.field = field
class WorkItemReference(Model):
"""
Contains reference to a work item.
:param id: Work item ID.
:type id: int
:param url: REST API URL of the resource
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, url=None):
super(WorkItemReference, self).__init__()
self.id = id
self.url = url
class WorkItemRelation(Link):
"""
:param attributes: Collection of link attributes.
:type attributes: dict
:param rel: Relation type.
:type rel: str
:param url: Link url.
:type url: str
"""
_attribute_map = {
'attributes': {'key': 'attributes', 'type': '{object}'},
'rel': {'key': 'rel', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
}
def __init__(self, attributes=None, rel=None, url=None):
super(WorkItemRelation, self).__init__(attributes=attributes, rel=rel, url=url)
class WorkItemRelationUpdates(Model):
"""
Describes updates to a work item's relations.
:param added: List of newly added relations.
:type added: list of :class:`WorkItemRelation <azure.devops.v7_1.work_item_tracking.models.WorkItemRelation>`
:param removed: List of removed relations.
:type removed: list of :class:`WorkItemRelation <azure.devops.v7_1.work_item_tracking.models.WorkItemRelation>`
:param updated: List of updated relations.
:type updated: list of :class:`WorkItemRelation <azure.devops.v7_1.work_item_tracking.models.WorkItemRelation>`
"""
_attribute_map = {
'added': {'key': 'added', 'type': '[WorkItemRelation]'},
'removed': {'key': 'removed', 'type': '[WorkItemRelation]'},
'updated': {'key': 'updated', 'type': '[WorkItemRelation]'}
}
def __init__(self, added=None, removed=None, updated=None):
super(WorkItemRelationUpdates, self).__init__()
self.added = added
self.removed = removed
self.updated = updated
class WorkItemStateColor(Model):
"""
Work item type state name, color and state category
:param category: Category of state
:type category: str
:param color: Color value
:type color: str
:param name: Work item type state name
:type name: str
"""
_attribute_map = {
'category': {'key': 'category', 'type': 'str'},
'color': {'key': 'color', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, category=None, color=None, name=None):
super(WorkItemStateColor, self).__init__()
self.category = category
self.color = color
self.name = name
class WorkItemStateTransition(Model):
"""
Describes a state transition in a work item.
:param actions: Gets a list of actions needed to transition to that state.
:type actions: list of str
:param to: Name of the next state.
:type to: str
"""
_attribute_map = {
'actions': {'key': 'actions', 'type': '[str]'},
'to': {'key': 'to', 'type': 'str'}
}
def __init__(self, actions=None, to=None):
super(WorkItemStateTransition, self).__init__()
self.actions = actions
self.to = to
class WorkItemTagDefinition(Model):
"""
:param id:
:type id: str
:param last_updated:
:type last_updated: datetime
:param name:
:type name: str
:param url:
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, last_updated=None, name=None, url=None):
super(WorkItemTagDefinition, self).__init__()
self.id = id
self.last_updated = last_updated
self.name = name
self.url = url
class WorkItemTrackingResourceReference(Model):
"""
Base class for work item tracking resource references.
:param url:
:type url: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, url=None):
super(WorkItemTrackingResourceReference, self).__init__()
self.url = url
class WorkItemTypeColor(Model):
"""
Describes a work item type's colors.
:param primary_color: Gets or sets the color of the primary.
:type primary_color: str
:param secondary_color: Gets or sets the color of the secondary.
:type secondary_color: str
:param work_item_type_name: The name of the work item type.
:type work_item_type_name: str
"""
_attribute_map = {
'primary_color': {'key': 'primaryColor', 'type': 'str'},
'secondary_color': {'key': 'secondaryColor', 'type': 'str'},
'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'}
}
def __init__(self, primary_color=None, secondary_color=None, work_item_type_name=None):
super(WorkItemTypeColor, self).__init__()
self.primary_color = primary_color
self.secondary_color = secondary_color
self.work_item_type_name = work_item_type_name
class WorkItemTypeColorAndIcon(Model):
"""
Describes work item type name, its icon and color.
:param color: The color of the work item type in hex format.
:type color: str
:param icon: The work item type icon.
:type icon: str
:param is_disabled: Indicates if the work item is disabled in the process.
:type is_disabled: bool
:param work_item_type_name: The name of the work item type.
:type work_item_type_name: str
"""
_attribute_map = {
'color': {'key': 'color', 'type': 'str'},
'icon': {'key': 'icon', 'type': 'str'},
'is_disabled': {'key': 'isDisabled', 'type': 'bool'},
'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'}
}
def __init__(self, color=None, icon=None, is_disabled=None, work_item_type_name=None):
super(WorkItemTypeColorAndIcon, self).__init__()
self.color = color
self.icon = icon
self.is_disabled = is_disabled
self.work_item_type_name = work_item_type_name
class WorkItemTypeFieldInstanceBase(WorkItemFieldReference):
"""
Base field instance for workItemType fields.
:param name: The friendly name of the field.
:type name: str
:param reference_name: The reference name of the field.
:type reference_name: str
:param url: The REST URL of the resource.
:type url: str
:param always_required: Indicates whether field value is always required.
:type always_required: bool
:param dependent_fields: The list of dependent fields.
:type dependent_fields: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param help_text: Gets the help text for the field.
:type help_text: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'always_required': {'key': 'alwaysRequired', 'type': 'bool'},
'dependent_fields': {'key': 'dependentFields', 'type': '[WorkItemFieldReference]'},
'help_text': {'key': 'helpText', 'type': 'str'}
}
def __init__(self, name=None, reference_name=None, url=None, always_required=None, dependent_fields=None, help_text=None):
super(WorkItemTypeFieldInstanceBase, self).__init__(name=name, reference_name=reference_name, url=url)
self.always_required = always_required
self.dependent_fields = dependent_fields
self.help_text = help_text
class WorkItemTypeFieldWithReferences(WorkItemTypeFieldInstanceBase):
"""
Field Instance of a workItemype with detailed references.
:param name: The friendly name of the field.
:type name: str
:param reference_name: The reference name of the field.
:type reference_name: str
:param url: The REST URL of the resource.
:type url: str
:param always_required: Indicates whether field value is always required.
:type always_required: bool
:param dependent_fields: The list of dependent fields.
:type dependent_fields: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param help_text: Gets the help text for the field.
:type help_text: str
:param allowed_values: The list of field allowed values.
:type allowed_values: list of object
:param default_value: Represents the default value of the field.
:type default_value: object
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'always_required': {'key': 'alwaysRequired', 'type': 'bool'},
'dependent_fields': {'key': 'dependentFields', 'type': '[WorkItemFieldReference]'},
'help_text': {'key': 'helpText', 'type': 'str'},
'allowed_values': {'key': 'allowedValues', 'type': '[object]'},
'default_value': {'key': 'defaultValue', 'type': 'object'}
}
def __init__(self, name=None, reference_name=None, url=None, always_required=None, dependent_fields=None, help_text=None, allowed_values=None, default_value=None):
super(WorkItemTypeFieldWithReferences, self).__init__(name=name, reference_name=reference_name, url=url, always_required=always_required, dependent_fields=dependent_fields, help_text=help_text)
self.allowed_values = allowed_values
self.default_value = default_value
class WorkItemTypeReference(WorkItemTrackingResourceReference):
"""
Reference to a work item type.
:param url:
:type url: str
:param name: Name of the work item type.
:type name: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, url=None, name=None):
super(WorkItemTypeReference, self).__init__(url=url)
self.name = name
class WorkItemTypeStateColors(Model):
"""
State colors for a work item type
:param state_colors: Work item type state colors
:type state_colors: list of :class:`WorkItemStateColor <azure.devops.v7_1.work_item_tracking.models.WorkItemStateColor>`
:param work_item_type_name: Work item type name
:type work_item_type_name: str
"""
_attribute_map = {
'state_colors': {'key': 'stateColors', 'type': '[WorkItemStateColor]'},
'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'}
}
def __init__(self, state_colors=None, work_item_type_name=None):
super(WorkItemTypeStateColors, self).__init__()
self.state_colors = state_colors
self.work_item_type_name = work_item_type_name
class WorkItemTypeTemplate(Model):
"""
Describes a work item type template.
:param template: XML template in string format.
:type template: str
"""
_attribute_map = {
'template': {'key': 'template', 'type': 'str'}
}
def __init__(self, template=None):
super(WorkItemTypeTemplate, self).__init__()
self.template = template
class WorkItemTypeTemplateUpdateModel(Model):
"""
Describes a update work item type template request body.
:param action_type: Describes the type of the action for the update request.
:type action_type: object
:param methodology: Methodology to which the template belongs, eg. Agile, Scrum, CMMI.
:type methodology: str
:param template: String representation of the work item type template.
:type template: str
:param template_type: The type of the template described in the request body.
:type template_type: object
"""
_attribute_map = {
'action_type': {'key': 'actionType', 'type': 'object'},
'methodology': {'key': 'methodology', 'type': 'str'},
'template': {'key': 'template', 'type': 'str'},
'template_type': {'key': 'templateType', 'type': 'object'}
}
def __init__(self, action_type=None, methodology=None, template=None, template_type=None):
super(WorkItemTypeTemplateUpdateModel, self).__init__()
self.action_type = action_type
self.methodology = methodology
self.template = template
self.template_type = template_type
class AccountRecentActivityWorkItemModel(AccountRecentActivityWorkItemModelBase):
"""
Represents Work Item Recent Activity
:param activity_date: Date of the last Activity by the user
:type activity_date: datetime
:param activity_type: Type of the activity
:type activity_type: object
:param changed_date: Last changed date of the work item
:type changed_date: datetime
:param id: Work Item Id
:type id: int
:param identity_id: TeamFoundationId of the user this activity belongs to
:type identity_id: str
:param state: State of the work item
:type state: str
:param team_project: Team project the work item belongs to
:type team_project: str
:param title: Title of the work item
:type title: str
:param work_item_type: Type of Work Item
:type work_item_type: str
:param assigned_to: Assigned To
:type assigned_to: str
"""
_attribute_map = {
'activity_date': {'key': 'activityDate', 'type': 'iso-8601'},
'activity_type': {'key': 'activityType', 'type': 'object'},
'changed_date': {'key': 'changedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'int'},
'identity_id': {'key': 'identityId', 'type': 'str'},
'state': {'key': 'state', 'type': 'str'},
'team_project': {'key': 'teamProject', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'work_item_type': {'key': 'workItemType', 'type': 'str'},
'assigned_to': {'key': 'assignedTo', 'type': 'str'}
}
def __init__(self, activity_date=None, activity_type=None, changed_date=None, id=None, identity_id=None, state=None, team_project=None, title=None, work_item_type=None, assigned_to=None):
super(AccountRecentActivityWorkItemModel, self).__init__(activity_date=activity_date, activity_type=activity_type, changed_date=changed_date, id=id, identity_id=identity_id, state=state, team_project=team_project, title=title, work_item_type=work_item_type)
self.assigned_to = assigned_to
class AccountRecentActivityWorkItemModel2(AccountRecentActivityWorkItemModelBase):
"""
Represents Work Item Recent Activity
:param activity_date: Date of the last Activity by the user
:type activity_date: datetime
:param activity_type: Type of the activity
:type activity_type: object
:param changed_date: Last changed date of the work item
:type changed_date: datetime
:param id: Work Item Id
:type id: int
:param identity_id: TeamFoundationId of the user this activity belongs to
:type identity_id: str
:param state: State of the work item
:type state: str
:param team_project: Team project the work item belongs to
:type team_project: str
:param title: Title of the work item
:type title: str
:param work_item_type: Type of Work Item
:type work_item_type: str
:param assigned_to: Assigned To
:type assigned_to: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
"""
_attribute_map = {
'activity_date': {'key': 'activityDate', 'type': 'iso-8601'},
'activity_type': {'key': 'activityType', 'type': 'object'},
'changed_date': {'key': 'changedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'int'},
'identity_id': {'key': 'identityId', 'type': 'str'},
'state': {'key': 'state', 'type': 'str'},
'team_project': {'key': 'teamProject', 'type': 'str'},
'title': {'key': 'title', 'type': 'str'},
'work_item_type': {'key': 'workItemType', 'type': 'str'},
'assigned_to': {'key': 'assignedTo', 'type': 'IdentityRef'}
}
def __init__(self, activity_date=None, activity_type=None, changed_date=None, id=None, identity_id=None, state=None, team_project=None, title=None, work_item_type=None, assigned_to=None):
super(AccountRecentActivityWorkItemModel2, self).__init__(activity_date=activity_date, activity_type=activity_type, changed_date=changed_date, id=id, identity_id=identity_id, state=state, team_project=team_project, title=title, work_item_type=work_item_type)
self.assigned_to = assigned_to
class ReportingWorkItemLinksBatch(StreamedBatch):
"""
"""
_attribute_map = {
}
def __init__(self):
super(ReportingWorkItemLinksBatch, self).__init__()
class ReportingWorkItemRevisionsBatch(StreamedBatch):
"""
"""
_attribute_map = {
}
def __init__(self):
super(ReportingWorkItemRevisionsBatch, self).__init__()
class WorkItemCommentVersionRef(WorkItemTrackingResourceReference):
"""
Represents the reference to a specific version of a comment on a Work Item.
:param url:
:type url: str
:param comment_id: The id assigned to the comment.
:type comment_id: int
:param created_in_revision: [Internal] The work item revision where this comment was originally added.
:type created_in_revision: int
:param is_deleted: [Internal] Specifies whether comment was deleted.
:type is_deleted: bool
:param text: [Internal] The text of the comment.
:type text: str
:param version: The version number.
:type version: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'comment_id': {'key': 'commentId', 'type': 'int'},
'created_in_revision': {'key': 'createdInRevision', 'type': 'int'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'text': {'key': 'text', 'type': 'str'},
'version': {'key': 'version', 'type': 'int'}
}
def __init__(self, url=None, comment_id=None, created_in_revision=None, is_deleted=None, text=None, version=None):
super(WorkItemCommentVersionRef, self).__init__(url=url)
self.comment_id = comment_id
self.created_in_revision = created_in_revision
self.is_deleted = is_deleted
self.text = text
self.version = version
class WorkItemDelete(WorkItemDeleteReference):
"""
Full deleted work item object. Includes the work item itself.
:param code: The HTTP status code for work item operation in a batch request.
:type code: int
:param deleted_by: The user who deleted the work item type.
:type deleted_by: str
:param deleted_date: The work item deletion date.
:type deleted_date: str
:param id: Work item ID.
:type id: int
:param message: The exception message for work item operation in a batch request.
:type message: str
:param name: Name or title of the work item.
:type name: str
:param project: Parent project of the deleted work item.
:type project: str
:param type: Type of work item.
:type type: str
:param url: REST API URL of the resource
:type url: str
:param resource: The work item object that was deleted.
:type resource: :class:`WorkItem <azure.devops.v7_1.work_item_tracking.models.WorkItem>`
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'int'},
'deleted_by': {'key': 'deletedBy', 'type': 'str'},
'deleted_date': {'key': 'deletedDate', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'message': {'key': 'message', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'project': {'key': 'project', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'WorkItem'}
}
def __init__(self, code=None, deleted_by=None, deleted_date=None, id=None, message=None, name=None, project=None, type=None, url=None, resource=None):
super(WorkItemDelete, self).__init__(code=code, deleted_by=deleted_by, deleted_date=deleted_date, id=id, message=message, name=name, project=project, type=type, url=url)
self.resource = resource
class WorkItemTrackingResource(WorkItemTrackingResourceReference):
"""
Base class for WIT REST resources.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'}
}
def __init__(self, url=None, _links=None):
super(WorkItemTrackingResource, self).__init__(url=url)
self._links = _links
class WorkItemType(WorkItemTrackingResource):
"""
Describes a work item type.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param color: The color.
:type color: str
:param description: The description of the work item type.
:type description: str
:param field_instances: The fields that exist on the work item type.
:type field_instances: list of :class:`WorkItemTypeFieldInstance <azure.devops.v7_1.work_item_tracking.models.WorkItemTypeFieldInstance>`
:param fields: The fields that exist on the work item type.
:type fields: list of :class:`WorkItemTypeFieldInstance <azure.devops.v7_1.work_item_tracking.models.WorkItemTypeFieldInstance>`
:param icon: The icon of the work item type.
:type icon: :class:`WorkItemIcon <azure.devops.v7_1.work_item_tracking.models.WorkItemIcon>`
:param is_disabled: True if work item type is disabled
:type is_disabled: bool
:param name: Gets the name of the work item type.
:type name: str
:param reference_name: The reference name of the work item type.
:type reference_name: str
:param states: Gets state information for the work item type.
:type states: list of :class:`WorkItemStateColor <azure.devops.v7_1.work_item_tracking.models.WorkItemStateColor>`
:param transitions: Gets the various state transition mappings in the work item type.
:type transitions: dict
:param xml_form: The XML form.
:type xml_form: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'color': {'key': 'color', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'field_instances': {'key': 'fieldInstances', 'type': '[WorkItemTypeFieldInstance]'},
'fields': {'key': 'fields', 'type': '[WorkItemTypeFieldInstance]'},
'icon': {'key': 'icon', 'type': 'WorkItemIcon'},
'is_disabled': {'key': 'isDisabled', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'states': {'key': 'states', 'type': '[WorkItemStateColor]'},
'transitions': {'key': 'transitions', 'type': '{[WorkItemStateTransition]}'},
'xml_form': {'key': 'xmlForm', 'type': 'str'}
}
def __init__(self, url=None, _links=None, color=None, description=None, field_instances=None, fields=None, icon=None, is_disabled=None, name=None, reference_name=None, states=None, transitions=None, xml_form=None):
super(WorkItemType, self).__init__(url=url, _links=_links)
self.color = color
self.description = description
self.field_instances = field_instances
self.fields = fields
self.icon = icon
self.is_disabled = is_disabled
self.name = name
self.reference_name = reference_name
self.states = states
self.transitions = transitions
self.xml_form = xml_form
class WorkItemTypeCategory(WorkItemTrackingResource):
"""
Describes a work item type category.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param default_work_item_type: Gets or sets the default type of the work item.
:type default_work_item_type: :class:`WorkItemTypeReference <azure.devops.v7_1.work_item_tracking.models.WorkItemTypeReference>`
:param name: The name of the category.
:type name: str
:param reference_name: The reference name of the category.
:type reference_name: str
:param work_item_types: The work item types that belong to the category.
:type work_item_types: list of :class:`WorkItemTypeReference <azure.devops.v7_1.work_item_tracking.models.WorkItemTypeReference>`
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'default_work_item_type': {'key': 'defaultWorkItemType', 'type': 'WorkItemTypeReference'},
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'}
}
def __init__(self, url=None, _links=None, default_work_item_type=None, name=None, reference_name=None, work_item_types=None):
super(WorkItemTypeCategory, self).__init__(url=url, _links=_links)
self.default_work_item_type = default_work_item_type
self.name = name
self.reference_name = reference_name
self.work_item_types = work_item_types
class WorkItemTypeFieldInstance(WorkItemTypeFieldInstanceBase):
"""
Field instance of a work item type.
:param name: The friendly name of the field.
:type name: str
:param reference_name: The reference name of the field.
:type reference_name: str
:param url: The REST URL of the resource.
:type url: str
:param always_required: Indicates whether field value is always required.
:type always_required: bool
:param dependent_fields: The list of dependent fields.
:type dependent_fields: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param help_text: Gets the help text for the field.
:type help_text: str
:param allowed_values: The list of field allowed values.
:type allowed_values: list of str
:param default_value: Represents the default value of the field.
:type default_value: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'always_required': {'key': 'alwaysRequired', 'type': 'bool'},
'dependent_fields': {'key': 'dependentFields', 'type': '[WorkItemFieldReference]'},
'help_text': {'key': 'helpText', 'type': 'str'},
'allowed_values': {'key': 'allowedValues', 'type': '[str]'},
'default_value': {'key': 'defaultValue', 'type': 'str'}
}
def __init__(self, name=None, reference_name=None, url=None, always_required=None, dependent_fields=None, help_text=None, allowed_values=None, default_value=None):
super(WorkItemTypeFieldInstance, self).__init__(name=name, reference_name=reference_name, url=url, always_required=always_required, dependent_fields=dependent_fields, help_text=help_text)
self.allowed_values = allowed_values
self.default_value = default_value
class WorkItemUpdate(WorkItemTrackingResource):
"""
Describes an update to a work item.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param fields: List of updates to fields.
:type fields: dict
:param id: ID of update.
:type id: int
:param relations: List of updates to relations.
:type relations: :class:`WorkItemRelationUpdates <azure.devops.v7_1.work_item_tracking.models.WorkItemRelationUpdates>`
:param rev: The revision number of work item update.
:type rev: int
:param revised_by: Identity for the work item update.
:type revised_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param revised_date: The work item updates revision date.
:type revised_date: datetime
:param work_item_id: The work item ID.
:type work_item_id: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'fields': {'key': 'fields', 'type': '{WorkItemFieldUpdate}'},
'id': {'key': 'id', 'type': 'int'},
'relations': {'key': 'relations', 'type': 'WorkItemRelationUpdates'},
'rev': {'key': 'rev', 'type': 'int'},
'revised_by': {'key': 'revisedBy', 'type': 'IdentityReference'},
'revised_date': {'key': 'revisedDate', 'type': 'iso-8601'},
'work_item_id': {'key': 'workItemId', 'type': 'int'}
}
def __init__(self, url=None, _links=None, fields=None, id=None, relations=None, rev=None, revised_by=None, revised_date=None, work_item_id=None):
super(WorkItemUpdate, self).__init__(url=url, _links=_links)
self.fields = fields
self.id = id
self.relations = relations
self.rev = rev
self.revised_by = revised_by
self.revised_date = revised_date
self.work_item_id = work_item_id
class Comment(WorkItemTrackingResource):
"""
Comment on a Work Item.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param created_by: IdentityRef of the creator of the comment.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param created_date: The creation date of the comment.
:type created_date: datetime
:param created_on_behalf_date: Effective Date/time value for adding the comment. Can be optionally different from CreatedDate.
:type created_on_behalf_date: datetime
:param created_on_behalf_of: Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy.
:type created_on_behalf_of: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param format: Represents the possible types for the comment format.
:type format: object
:param id: The id assigned to the comment.
:type id: int
:param is_deleted: Indicates if the comment has been deleted.
:type is_deleted: bool
:param mentions: The mentions of the comment.
:type mentions: list of :class:`CommentMention <azure.devops.v7_1.work_item_tracking.models.CommentMention>`
:param modified_by: IdentityRef of the user who last modified the comment.
:type modified_by: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param modified_date: The last modification date of the comment.
:type modified_date: datetime
:param reactions: The reactions of the comment.
:type reactions: list of :class:`CommentReaction <azure.devops.v7_1.work_item_tracking.models.CommentReaction>`
:param rendered_text: The text of the comment in HTML format.
:type rendered_text: str
:param text: The text of the comment.
:type text: str
:param version: The current version of the comment.
:type version: int
:param work_item_id: The id of the work item this comment belongs to.
:type work_item_id: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'created_on_behalf_date': {'key': 'createdOnBehalfDate', 'type': 'iso-8601'},
'created_on_behalf_of': {'key': 'createdOnBehalfOf', 'type': 'IdentityRef'},
'format': {'key': 'format', 'type': 'object'},
'id': {'key': 'id', 'type': 'int'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'mentions': {'key': 'mentions', 'type': '[CommentMention]'},
'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'},
'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
'reactions': {'key': 'reactions', 'type': '[CommentReaction]'},
'rendered_text': {'key': 'renderedText', 'type': 'str'},
'text': {'key': 'text', 'type': 'str'},
'version': {'key': 'version', 'type': 'int'},
'work_item_id': {'key': 'workItemId', 'type': 'int'}
}
def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, format=None, id=None, is_deleted=None, mentions=None, modified_by=None, modified_date=None, reactions=None, rendered_text=None, text=None, version=None, work_item_id=None):
super(Comment, self).__init__(url=url, _links=_links)
self.created_by = created_by
self.created_date = created_date
self.created_on_behalf_date = created_on_behalf_date
self.created_on_behalf_of = created_on_behalf_of
self.format = format
self.id = id
self.is_deleted = is_deleted
self.mentions = mentions
self.modified_by = modified_by
self.modified_date = modified_date
self.reactions = reactions
self.rendered_text = rendered_text
self.text = text
self.version = version
self.work_item_id = work_item_id
class CommentList(WorkItemTrackingResource):
"""
Represents a list of work item comments.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param comments: List of comments in the current batch.
:type comments: list of :class:`Comment <azure.devops.v7_1.work_item_tracking.models.Comment>`
:param continuation_token: A string token that can be used to retrieving next page of comments if available. Otherwise null.
:type continuation_token: str
:param count: The count of comments in the current batch.
:type count: int
:param next_page: Uri to the next page of comments if it is available. Otherwise null.
:type next_page: str
:param total_count: Total count of comments on a work item.
:type total_count: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comments': {'key': 'comments', 'type': '[Comment]'},
'continuation_token': {'key': 'continuationToken', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'next_page': {'key': 'nextPage', 'type': 'str'},
'total_count': {'key': 'totalCount', 'type': 'int'}
}
def __init__(self, url=None, _links=None, comments=None, continuation_token=None, count=None, next_page=None, total_count=None):
super(CommentList, self).__init__(url=url, _links=_links)
self.comments = comments
self.continuation_token = continuation_token
self.count = count
self.next_page = next_page
self.total_count = total_count
class CommentMention(WorkItemTrackingResource):
"""
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param artifact_id: The artifact portion of the parsed text. (i.e. the work item's id)
:type artifact_id: str
:param artifact_type: The type the parser assigned to the mention. (i.e. person, work item, etc)
:type artifact_type: str
:param comment_id: The comment id of the mention.
:type comment_id: int
:param target_id: The resolved target of the mention. An example of this could be a user's tfid
:type target_id: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'artifact_type': {'key': 'artifactType', 'type': 'str'},
'comment_id': {'key': 'commentId', 'type': 'int'},
'target_id': {'key': 'targetId', 'type': 'str'}
}
def __init__(self, url=None, _links=None, artifact_id=None, artifact_type=None, comment_id=None, target_id=None):
super(CommentMention, self).__init__(url=url, _links=_links)
self.artifact_id = artifact_id
self.artifact_type = artifact_type
self.comment_id = comment_id
self.target_id = target_id
class CommentReaction(WorkItemTrackingResource):
"""
Contains information about work item comment reaction for a particular reaction type.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param comment_id: The id of the comment this reaction belongs to.
:type comment_id: int
:param count: Total number of reactions for the CommentReactionType.
:type count: int
:param is_current_user_engaged: Flag to indicate if the current user has engaged on this particular EngagementType (e.g. if they liked the associated comment).
:type is_current_user_engaged: bool
:param type: Type of the reaction.
:type type: object
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comment_id': {'key': 'commentId', 'type': 'int'},
'count': {'key': 'count', 'type': 'int'},
'is_current_user_engaged': {'key': 'isCurrentUserEngaged', 'type': 'bool'},
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, url=None, _links=None, comment_id=None, count=None, is_current_user_engaged=None, type=None):
super(CommentReaction, self).__init__(url=url, _links=_links)
self.comment_id = comment_id
self.count = count
self.is_current_user_engaged = is_current_user_engaged
self.type = type
class CommentVersion(WorkItemTrackingResource):
"""
Represents a specific version of a comment on a work item.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param created_by: IdentityRef of the creator of the comment.
:type created_by: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param created_date: The creation date of the comment.
:type created_date: datetime
:param created_on_behalf_date: Effective Date/time value for adding the comment. Can be optionally different from CreatedDate.
:type created_on_behalf_date: datetime
:param created_on_behalf_of: Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy.
:type created_on_behalf_of: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param id: The id assigned to the comment.
:type id: int
:param is_deleted: Indicates if the comment has been deleted at this version.
:type is_deleted: bool
:param modified_by: IdentityRef of the user who modified the comment at this version.
:type modified_by: :class:`IdentityRef <azure.devops.v7_1.work_item_tracking.models.IdentityRef>`
:param modified_date: The modification date of the comment for this version.
:type modified_date: datetime
:param rendered_text: The rendered content of the comment at this version.
:type rendered_text: str
:param text: The text of the comment at this version.
:type text: str
:param version: The version number.
:type version: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'created_on_behalf_date': {'key': 'createdOnBehalfDate', 'type': 'iso-8601'},
'created_on_behalf_of': {'key': 'createdOnBehalfOf', 'type': 'IdentityRef'},
'id': {'key': 'id', 'type': 'int'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'},
'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
'rendered_text': {'key': 'renderedText', 'type': 'str'},
'text': {'key': 'text', 'type': 'str'},
'version': {'key': 'version', 'type': 'int'}
}
def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, id=None, is_deleted=None, modified_by=None, modified_date=None, rendered_text=None, text=None, version=None):
super(CommentVersion, self).__init__(url=url, _links=_links)
self.created_by = created_by
self.created_date = created_date
self.created_on_behalf_date = created_on_behalf_date
self.created_on_behalf_of = created_on_behalf_of
self.id = id
self.is_deleted = is_deleted
self.modified_by = modified_by
self.modified_date = modified_date
self.rendered_text = rendered_text
self.text = text
self.version = version
class FieldDependentRule(WorkItemTrackingResource):
"""
Describes a list of dependent fields for a rule.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param dependent_fields: The dependent fields.
:type dependent_fields: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'dependent_fields': {'key': 'dependentFields', 'type': '[WorkItemFieldReference]'}
}
def __init__(self, url=None, _links=None, dependent_fields=None):
super(FieldDependentRule, self).__init__(url=url, _links=_links)
self.dependent_fields = dependent_fields
class QueryHierarchyItem(WorkItemTrackingResource):
"""
Represents an item in the work item query hierarchy. This can be either a query or a folder.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param clauses: The clauses for a flat query.
:type clauses: :class:`WorkItemQueryClause <azure.devops.v7_1.work_item_tracking.models.WorkItemQueryClause>`
:param columns: The columns of the query.
:type columns: list of :class:`WorkItemFieldReference <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldReference>`
:param created_by: The identity who created the query item.
:type created_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param created_date: When the query item was created.
:type created_date: datetime
:param filter_options: The link query mode.
:type filter_options: object
:param has_children: If this is a query folder, indicates if it contains any children.
:type has_children: bool
:param children: The child query items inside a query folder.
:type children: list of :class:`QueryHierarchyItem <azure.devops.v7_1.work_item_tracking.models.QueryHierarchyItem>`
:param id: The id of the query item.
:type id: str
:param is_deleted: Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it.
:type is_deleted: bool
:param is_folder: Indicates if this is a query folder or a query.
:type is_folder: bool
:param is_invalid_syntax: Indicates if the WIQL of this query is invalid. This could be due to invalid syntax or a no longer valid area/iteration path.
:type is_invalid_syntax: bool
:param is_public: Indicates if this query item is public or private.
:type is_public: bool
:param last_executed_by: The identity who last ran the query.
:type last_executed_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param last_executed_date: When the query was last run.
:type last_executed_date: datetime
:param last_modified_by: The identity who last modified the query item.
:type last_modified_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param last_modified_date: When the query item was last modified.
:type last_modified_date: datetime
:param link_clauses: The link query clause.
:type link_clauses: :class:`WorkItemQueryClause <azure.devops.v7_1.work_item_tracking.models.WorkItemQueryClause>`
:param name: The name of the query item.
:type name: str
:param path: The path of the query item.
:type path: str
:param query_recursion_option: The recursion option for use in a tree query.
:type query_recursion_option: object
:param query_type: The type of query.
:type query_type: object
:param sort_columns: The sort columns of the query.
:type sort_columns: list of :class:`WorkItemQuerySortColumn <azure.devops.v7_1.work_item_tracking.models.WorkItemQuerySortColumn>`
:param source_clauses: The source clauses in a tree or one-hop link query.
:type source_clauses: :class:`WorkItemQueryClause <azure.devops.v7_1.work_item_tracking.models.WorkItemQueryClause>`
:param target_clauses: The target clauses in a tree or one-hop link query.
:type target_clauses: :class:`WorkItemQueryClause <azure.devops.v7_1.work_item_tracking.models.WorkItemQueryClause>`
:param wiql: The WIQL text of the query
:type wiql: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'clauses': {'key': 'clauses', 'type': 'WorkItemQueryClause'},
'columns': {'key': 'columns', 'type': '[WorkItemFieldReference]'},
'created_by': {'key': 'createdBy', 'type': 'IdentityReference'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'filter_options': {'key': 'filterOptions', 'type': 'object'},
'has_children': {'key': 'hasChildren', 'type': 'bool'},
'children': {'key': 'children', 'type': '[QueryHierarchyItem]'},
'id': {'key': 'id', 'type': 'str'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'is_folder': {'key': 'isFolder', 'type': 'bool'},
'is_invalid_syntax': {'key': 'isInvalidSyntax', 'type': 'bool'},
'is_public': {'key': 'isPublic', 'type': 'bool'},
'last_executed_by': {'key': 'lastExecutedBy', 'type': 'IdentityReference'},
'last_executed_date': {'key': 'lastExecutedDate', 'type': 'iso-8601'},
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityReference'},
'last_modified_date': {'key': 'lastModifiedDate', 'type': 'iso-8601'},
'link_clauses': {'key': 'linkClauses', 'type': 'WorkItemQueryClause'},
'name': {'key': 'name', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'},
'query_recursion_option': {'key': 'queryRecursionOption', 'type': 'object'},
'query_type': {'key': 'queryType', 'type': 'object'},
'sort_columns': {'key': 'sortColumns', 'type': '[WorkItemQuerySortColumn]'},
'source_clauses': {'key': 'sourceClauses', 'type': 'WorkItemQueryClause'},
'target_clauses': {'key': 'targetClauses', 'type': 'WorkItemQueryClause'},
'wiql': {'key': 'wiql', 'type': 'str'}
}
def __init__(self, url=None, _links=None, clauses=None, columns=None, created_by=None, created_date=None, filter_options=None, has_children=None, children=None, id=None, is_deleted=None, is_folder=None, is_invalid_syntax=None, is_public=None, last_executed_by=None, last_executed_date=None, last_modified_by=None, last_modified_date=None, link_clauses=None, name=None, path=None, query_recursion_option=None, query_type=None, sort_columns=None, source_clauses=None, target_clauses=None, wiql=None):
super(QueryHierarchyItem, self).__init__(url=url, _links=_links)
self.clauses = clauses
self.columns = columns
self.created_by = created_by
self.created_date = created_date
self.filter_options = filter_options
self.has_children = has_children
self.children = children
self.id = id
self.is_deleted = is_deleted
self.is_folder = is_folder
self.is_invalid_syntax = is_invalid_syntax
self.is_public = is_public
self.last_executed_by = last_executed_by
self.last_executed_date = last_executed_date
self.last_modified_by = last_modified_by
self.last_modified_date = last_modified_date
self.link_clauses = link_clauses
self.name = name
self.path = path
self.query_recursion_option = query_recursion_option
self.query_type = query_type
self.sort_columns = sort_columns
self.source_clauses = source_clauses
self.target_clauses = target_clauses
self.wiql = wiql
class TemporaryQueryRequestModel(WorkItemTrackingResource):
"""
Describes a request to create a temporary query
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param wiql: The WIQL text of the temporary query
:type wiql: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'wiql': {'key': 'wiql', 'type': 'str'}
}
def __init__(self, url=None, _links=None, wiql=None):
super(TemporaryQueryRequestModel, self).__init__(url=url, _links=_links)
self.wiql = wiql
class WorkItem(WorkItemTrackingResource):
"""
Describes a work item.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param comment_version_ref: Reference to a specific version of the comment added/edited/deleted in this revision.
:type comment_version_ref: :class:`WorkItemCommentVersionRef <azure.devops.v7_1.work_item_tracking.models.WorkItemCommentVersionRef>`
:param fields: Map of field and values for the work item.
:type fields: dict
:param id: The work item ID.
:type id: int
:param relations: Relations of the work item.
:type relations: list of :class:`WorkItemRelation <azure.devops.v7_1.work_item_tracking.models.WorkItemRelation>`
:param rev: Revision number of the work item.
:type rev: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comment_version_ref': {'key': 'commentVersionRef', 'type': 'WorkItemCommentVersionRef'},
'fields': {'key': 'fields', 'type': '{object}'},
'id': {'key': 'id', 'type': 'int'},
'relations': {'key': 'relations', 'type': '[WorkItemRelation]'},
'rev': {'key': 'rev', 'type': 'int'}
}
def __init__(self, url=None, _links=None, comment_version_ref=None, fields=None, id=None, relations=None, rev=None):
super(WorkItem, self).__init__(url=url, _links=_links)
self.comment_version_ref = comment_version_ref
self.fields = fields
self.id = id
self.relations = relations
self.rev = rev
class WorkItemClassificationNode(WorkItemTrackingResource):
"""
Defines a classification node for work item tracking.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param attributes: Dictionary that has node attributes like start/finish date for iteration nodes.
:type attributes: dict
:param has_children: Flag that indicates if the classification node has any child nodes.
:type has_children: bool
:param children: List of child nodes fetched.
:type children: list of :class:`WorkItemClassificationNode <azure.devops.v7_1.work_item_tracking.models.WorkItemClassificationNode>`
:param id: Integer ID of the classification node.
:type id: int
:param identifier: GUID ID of the classification node.
:type identifier: str
:param name: Name of the classification node.
:type name: str
:param path: Path of the classification node.
:type path: str
:param structure_type: Node structure type.
:type structure_type: object
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'attributes': {'key': 'attributes', 'type': '{object}'},
'has_children': {'key': 'hasChildren', 'type': 'bool'},
'children': {'key': 'children', 'type': '[WorkItemClassificationNode]'},
'id': {'key': 'id', 'type': 'int'},
'identifier': {'key': 'identifier', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'},
'structure_type': {'key': 'structureType', 'type': 'object'}
}
def __init__(self, url=None, _links=None, attributes=None, has_children=None, children=None, id=None, identifier=None, name=None, path=None, structure_type=None):
super(WorkItemClassificationNode, self).__init__(url=url, _links=_links)
self.attributes = attributes
self.has_children = has_children
self.children = children
self.id = id
self.identifier = identifier
self.name = name
self.path = path
self.structure_type = structure_type
class WorkItemComment(WorkItemTrackingResource):
"""
Comment on Work Item
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param format: Represents the possible types for the comment format.
:type format: object
:param rendered_text: The text of the comment in HTML format.
:type rendered_text: str
:param revised_by: Identity of user who added the comment.
:type revised_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param revised_date: The date of comment.
:type revised_date: datetime
:param revision: The work item revision number.
:type revision: int
:param text: The text of the comment.
:type text: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'format': {'key': 'format', 'type': 'object'},
'rendered_text': {'key': 'renderedText', 'type': 'str'},
'revised_by': {'key': 'revisedBy', 'type': 'IdentityReference'},
'revised_date': {'key': 'revisedDate', 'type': 'iso-8601'},
'revision': {'key': 'revision', 'type': 'int'},
'text': {'key': 'text', 'type': 'str'}
}
def __init__(self, url=None, _links=None, format=None, rendered_text=None, revised_by=None, revised_date=None, revision=None, text=None):
super(WorkItemComment, self).__init__(url=url, _links=_links)
self.format = format
self.rendered_text = rendered_text
self.revised_by = revised_by
self.revised_date = revised_date
self.revision = revision
self.text = text
class WorkItemComments(WorkItemTrackingResource):
"""
Collection of comments.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param comments: Comments collection.
:type comments: list of :class:`WorkItemComment <azure.devops.v7_1.work_item_tracking.models.WorkItemComment>`
:param count: The count of comments.
:type count: int
:param from_revision_count: Count of comments from the revision.
:type from_revision_count: int
:param total_count: Total count of comments.
:type total_count: int
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comments': {'key': 'comments', 'type': '[WorkItemComment]'},
'count': {'key': 'count', 'type': 'int'},
'from_revision_count': {'key': 'fromRevisionCount', 'type': 'int'},
'total_count': {'key': 'totalCount', 'type': 'int'}
}
def __init__(self, url=None, _links=None, comments=None, count=None, from_revision_count=None, total_count=None):
super(WorkItemComments, self).__init__(url=url, _links=_links)
self.comments = comments
self.count = count
self.from_revision_count = from_revision_count
self.total_count = total_count
class WorkItemField(WorkItemTrackingResource):
"""
Describes a field on a work item and it's properties specific to that work item type.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param can_sort_by: Indicates whether the field is sortable in server queries.
:type can_sort_by: bool
:param description: The description of the field.
:type description: str
:param is_deleted: Indicates whether this field is deleted.
:type is_deleted: bool
:param is_identity: Indicates whether this field is an identity field.
:type is_identity: bool
:param is_picklist: Indicates whether this instance is picklist.
:type is_picklist: bool
:param is_picklist_suggested: Indicates whether this instance is a suggested picklist .
:type is_picklist_suggested: bool
:param is_queryable: Indicates whether the field can be queried in the server.
:type is_queryable: bool
:param name: The name of the field.
:type name: str
:param picklist_id: If this field is picklist, the identifier of the picklist associated, otherwise null
:type picklist_id: str
:param read_only: Indicates whether the field is [read only].
:type read_only: bool
:param reference_name: The reference name of the field.
:type reference_name: str
:param supported_operations: The supported operations on this field.
:type supported_operations: list of :class:`WorkItemFieldOperation <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldOperation>`
:param type: The type of the field.
:type type: object
:param usage: The usage of the field.
:type usage: object
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'can_sort_by': {'key': 'canSortBy', 'type': 'bool'},
'description': {'key': 'description', 'type': 'str'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'is_identity': {'key': 'isIdentity', 'type': 'bool'},
'is_picklist': {'key': 'isPicklist', 'type': 'bool'},
'is_picklist_suggested': {'key': 'isPicklistSuggested', 'type': 'bool'},
'is_queryable': {'key': 'isQueryable', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'picklist_id': {'key': 'picklistId', 'type': 'str'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'supported_operations': {'key': 'supportedOperations', 'type': '[WorkItemFieldOperation]'},
'type': {'key': 'type', 'type': 'object'},
'usage': {'key': 'usage', 'type': 'object'}
}
def __init__(self, url=None, _links=None, can_sort_by=None, description=None, is_deleted=None, is_identity=None, is_picklist=None, is_picklist_suggested=None, is_queryable=None, name=None, picklist_id=None, read_only=None, reference_name=None, supported_operations=None, type=None, usage=None):
super(WorkItemField, self).__init__(url=url, _links=_links)
self.can_sort_by = can_sort_by
self.description = description
self.is_deleted = is_deleted
self.is_identity = is_identity
self.is_picklist = is_picklist
self.is_picklist_suggested = is_picklist_suggested
self.is_queryable = is_queryable
self.name = name
self.picklist_id = picklist_id
self.read_only = read_only
self.reference_name = reference_name
self.supported_operations = supported_operations
self.type = type
self.usage = usage
class WorkItemField2(WorkItemField):
"""
Describes a field on a work item and it's properties specific to that work item type.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param can_sort_by: Indicates whether the field is sortable in server queries.
:type can_sort_by: bool
:param description: The description of the field.
:type description: str
:param is_deleted: Indicates whether this field is deleted.
:type is_deleted: bool
:param is_identity: Indicates whether this field is an identity field.
:type is_identity: bool
:param is_picklist: Indicates whether this instance is picklist.
:type is_picklist: bool
:param is_picklist_suggested: Indicates whether this instance is a suggested picklist .
:type is_picklist_suggested: bool
:param is_queryable: Indicates whether the field can be queried in the server.
:type is_queryable: bool
:param name: The name of the field.
:type name: str
:param picklist_id: If this field is picklist, the identifier of the picklist associated, otherwise null
:type picklist_id: str
:param read_only: Indicates whether the field is [read only].
:type read_only: bool
:param reference_name: The reference name of the field.
:type reference_name: str
:param supported_operations: The supported operations on this field.
:type supported_operations: list of :class:`WorkItemFieldOperation <azure.devops.v7_1.work_item_tracking.models.WorkItemFieldOperation>`
:param type: The type of the field.
:type type: object
:param usage: The usage of the field.
:type usage: object
:param is_locked: Indicates whether this field is marked as locked for editing.
:type is_locked: bool
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'can_sort_by': {'key': 'canSortBy', 'type': 'bool'},
'description': {'key': 'description', 'type': 'str'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'is_identity': {'key': 'isIdentity', 'type': 'bool'},
'is_picklist': {'key': 'isPicklist', 'type': 'bool'},
'is_picklist_suggested': {'key': 'isPicklistSuggested', 'type': 'bool'},
'is_queryable': {'key': 'isQueryable', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'picklist_id': {'key': 'picklistId', 'type': 'str'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'supported_operations': {'key': 'supportedOperations', 'type': '[WorkItemFieldOperation]'},
'type': {'key': 'type', 'type': 'object'},
'usage': {'key': 'usage', 'type': 'object'},
'is_locked': {'key': 'isLocked', 'type': 'bool'}
}
def __init__(self, url=None, _links=None, can_sort_by=None, description=None, is_deleted=None, is_identity=None, is_picklist=None, is_picklist_suggested=None, is_queryable=None, name=None, picklist_id=None, read_only=None, reference_name=None, supported_operations=None, type=None, usage=None, is_locked=None):
super(WorkItemField2, self).__init__(url=url, _links=_links, can_sort_by=can_sort_by, description=description, is_deleted=is_deleted, is_identity=is_identity, is_picklist=is_picklist, is_picklist_suggested=is_picklist_suggested, is_queryable=is_queryable, name=name, picklist_id=picklist_id, read_only=read_only, reference_name=reference_name, supported_operations=supported_operations, type=type, usage=usage)
self.is_locked = is_locked
class WorkItemHistory(WorkItemTrackingResource):
"""
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param rev:
:type rev: int
:param revised_by:
:type revised_by: :class:`IdentityReference <azure.devops.v7_1.work_item_tracking.models.IdentityReference>`
:param revised_date:
:type revised_date: datetime
:param value:
:type value: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'rev': {'key': 'rev', 'type': 'int'},
'revised_by': {'key': 'revisedBy', 'type': 'IdentityReference'},
'revised_date': {'key': 'revisedDate', 'type': 'iso-8601'},
'value': {'key': 'value', 'type': 'str'}
}
def __init__(self, url=None, _links=None, rev=None, revised_by=None, revised_date=None, value=None):
super(WorkItemHistory, self).__init__(url=url, _links=_links)
self.rev = rev
self.revised_by = revised_by
self.revised_date = revised_date
self.value = value
class WorkItemTemplateReference(WorkItemTrackingResource):
"""
Describes a shallow reference to a work item template.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param description: The description of the work item template.
:type description: str
:param id: The identifier of the work item template.
:type id: str
:param name: The name of the work item template.
:type name: str
:param work_item_type_name: The name of the work item type.
:type work_item_type_name: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'}
}
def __init__(self, url=None, _links=None, description=None, id=None, name=None, work_item_type_name=None):
super(WorkItemTemplateReference, self).__init__(url=url, _links=_links)
self.description = description
self.id = id
self.name = name
self.work_item_type_name = work_item_type_name
class WorkItemTrackingReference(WorkItemTrackingResource):
"""
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param name: The name.
:type name: str
:param reference_name: The reference name.
:type reference_name: str
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'}
}
def __init__(self, url=None, _links=None, name=None, reference_name=None):
super(WorkItemTrackingReference, self).__init__(url=url, _links=_links)
self.name = name
self.reference_name = reference_name
class WorkItemRelationType(WorkItemTrackingReference):
"""
Represents the work item type relation type.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param name: The name.
:type name: str
:param reference_name: The reference name.
:type reference_name: str
:param attributes: The collection of relation type attributes.
:type attributes: dict
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'attributes': {'key': 'attributes', 'type': '{object}'}
}
def __init__(self, url=None, _links=None, name=None, reference_name=None, attributes=None):
super(WorkItemRelationType, self).__init__(url=url, _links=_links, name=name, reference_name=reference_name)
self.attributes = attributes
class WorkItemTemplate(WorkItemTemplateReference):
"""
Describes a work item template.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.work_item_tracking.models.ReferenceLinks>`
:param description: The description of the work item template.
:type description: str
:param id: The identifier of the work item template.
:type id: str
:param name: The name of the work item template.
:type name: str
:param work_item_type_name: The name of the work item type.
:type work_item_type_name: str
:param fields: Mapping of field and its templated value.
:type fields: dict
"""
_attribute_map = {
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'},
'fields': {'key': 'fields', 'type': '{str}'}
}
def __init__(self, url=None, _links=None, description=None, id=None, name=None, work_item_type_name=None, fields=None):
super(WorkItemTemplate, self).__init__(url=url, _links=_links, description=description, id=id, name=name, work_item_type_name=work_item_type_name)
self.fields = fields
__all__ = [
'AccountMyWorkResult',
'AccountRecentActivityWorkItemModelBase',
'AccountRecentMentionWorkItemModel',
'AccountWorkWorkItemModel',
'ArtifactUriQuery',
'ArtifactUriQueryResult',
'AttachmentReference',
'CommentCreate',
'CommentUpdate',
'EmailRecipients',
'ExternalDeployment',
'ExternalEnvironment',
'ExternalPipeline',
'FieldUpdate',
'GitHubConnectionModel',
'GitHubConnectionRepoModel',
'GitHubConnectionReposBatchRequest',
'GraphSubjectBase',
'IdentityRef',
'IdentityReference',
'JsonPatchOperation',
'Link',
'MailMessage',
'ProcessIdModel',
'ProcessMigrationResultModel',
'ProjectWorkItemStateColors',
'ProvisioningResult',
'QueryBatchGetRequest',
'QueryHierarchyItemsResult',
'ReferenceLinks',
'ReportingWorkItemRevisionsFilter',
'SendMailBody',
'StreamedBatch',
'TeamContext',
'TemporaryQueryResponseModel',
'UpdateWorkItemField',
'Wiql',
'WorkArtifactLink',
'WorkItemBatchGetRequest',
'WorkItemDeleteBatch',
'WorkItemDeleteBatchRequest',
'WorkItemDeleteReference',
'WorkItemDeleteShallowReference',
'WorkItemDeleteUpdate',
'WorkItemFieldAllowedValues',
'WorkItemFieldOperation',
'WorkItemFieldReference',
'WorkItemFieldUpdate',
'WorkItemIcon',
'WorkItemLink',
'WorkItemNextStateOnTransition',
'WorkItemQueryClause',
'WorkItemQueryResult',
'WorkItemQuerySortColumn',
'WorkItemReference',
'WorkItemRelation',
'WorkItemRelationUpdates',
'WorkItemStateColor',
'WorkItemStateTransition',
'WorkItemTagDefinition',
'WorkItemTrackingResourceReference',
'WorkItemTypeColor',
'WorkItemTypeColorAndIcon',
'WorkItemTypeFieldInstanceBase',
'WorkItemTypeFieldWithReferences',
'WorkItemTypeReference',
'WorkItemTypeStateColors',
'WorkItemTypeTemplate',
'WorkItemTypeTemplateUpdateModel',
'AccountRecentActivityWorkItemModel',
'AccountRecentActivityWorkItemModel2',
'ReportingWorkItemLinksBatch',
'ReportingWorkItemRevisionsBatch',
'WorkItemCommentVersionRef',
'WorkItemDelete',
'WorkItemTrackingResource',
'WorkItemType',
'WorkItemTypeCategory',
'WorkItemTypeFieldInstance',
'WorkItemUpdate',
'Comment',
'CommentList',
'CommentMention',
'CommentReaction',
'CommentVersion',
'FieldDependentRule',
'QueryHierarchyItem',
'TemporaryQueryRequestModel',
'WorkItem',
'WorkItemClassificationNode',
'WorkItemComment',
'WorkItemComments',
'WorkItemField',
'WorkItemField2',
'WorkItemHistory',
'WorkItemTemplateReference',
'WorkItemTrackingReference',
'WorkItemRelationType',
'WorkItemTemplate',
]
|
azure-devops-python-api/azure-devops/azure/devops/v7_1/work_item_tracking/models.py/0
|
{
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/work_item_tracking/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 49969
}
| 344 |
@REM -------------------------------------------------
@REM init section. Set _echo=1 to echo everything....
@IF NOT DEFINED _echo ECHO OFF
PUSHD %~dp0\..\..
SET BUILDDIR=%CD%
REM Set scripts directory
SET SCRIPTSDIR=%BUILDDIR%\scripts
REM Add the scripts directory to the path
SET PATH=%SCRIPTSDIR%\windows;%SCRIPTSDIR%;%PATH%
REM set title
TITLE Azure DevOps Python v5.x (in %BUILDDIR%)
REM setup common aliases
REM NOTE: macros in macros.txt work in *BOTH* cmd and powershell. Keep it that way.
REM Only add macros to macros.cmd.txt when the same macro cannot be used in both cmd and Powershell.
REM In that case, add equivalent macros to both macros.cmd.txt and macros.ps.txt, to ensure that
REM the cmd and Powershell development environments remain functionally identical.
doskey /MACROFILE=scripts\windows\macros.txt
doskey /MACROFILE=scripts\windows\macros.cmd.txt
IF EXIST "%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe" (
REM Build step installs Python here.
SET PYTHONEXE=%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe
) ELSE (
SET PYTHONEXE=python.exe
)
SET VDIR=%BUILDDIR%\env
IF NOT EXIST "%VDIR%" (
echo Creating new virtual environment under %VDIR%
"%PYTHONEXE%" -m venv "%VDIR%"
IF ERRORLEVEL 1 GOTO FAIL
)
SET PYTHONEXE=
"%VDIR%\scripts\activate.bat"
IF ERRORLEVEL 1 GOTO FAIL
SET PYTHONPATH=%BUILDDIR%;%PYTHONPATH%
GOTO :EOF
:PARSEPATH
SET "_PARSED_PATH=%~dp1"
GOTO :EOF
:FAIL
ECHO init failed.
EXIT /B 1
|
azure-devops-python-api/scripts/windows/init.cmd/0
|
{
"file_path": "azure-devops-python-api/scripts/windows/init.cmd",
"repo_id": "azure-devops-python-api",
"token_count": 546
}
| 345 |
{
"pythonTestExplorer.testFramework": "pytest",
"pythonTestExplorer.outputs.showOutputsOnRun": true,
"testExplorer.useNativeTesting": false,
"testExplorer.showOnRun": true,
"testExplorer.addToEditorContextMenu": true
}
|
azure-quantum-python/azure-quantum/.vscode/settings.json/0
|
{
"file_path": "azure-quantum-python/azure-quantum/.vscode/settings.json",
"repo_id": "azure-quantum-python",
"token_count": 88
}
| 346 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from enum import Enum
from azure.core import CaseInsensitiveEnumMeta
class DimensionScope(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The scope at which the quota is applied."""
WORKSPACE = "Workspace"
SUBSCRIPTION = "Subscription"
class ItemType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of item."""
JOB = "Job"
"""A program, problem, or application submitted for processing."""
SESSION = "Session"
"""A logical grouping of jobs."""
class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the job."""
WAITING = "Waiting"
EXECUTING = "Executing"
SUCCEEDED = "Succeeded"
FAILED = "Failed"
CANCELLED = "Cancelled"
class JobType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of job."""
UNKNOWN = "Unknown"
QUANTUM_COMPUTING = "QuantumComputing"
OPTIMIZATION = "Optimization"
class JsonPatchOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The operation to be performed."""
ADD = "add"
REMOVE = "remove"
REPLACE = "replace"
MOVE = "move"
COPY = "copy"
TEST = "test"
class MeterPeriod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The time period in which the quota's underlying meter is accumulated. Based on calendar year.
'None' is used for concurrent quotas.
"""
NONE = "None"
MONTHLY = "Monthly"
class ProviderAvailability(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provider availability."""
AVAILABLE = "Available"
DEGRADED = "Degraded"
UNAVAILABLE = "Unavailable"
class SessionJobFailurePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Policy controlling the behavior of the Session when a job in the session fails."""
ABORT = "Abort"
"""New jobs submitted after a job fails will be rejected."""
CONTINUE = "Continue"
"""New jobs submitted after a job fails will be accepted."""
class SessionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the session."""
WAITING = "Waiting"
EXECUTING = "Executing"
SUCCEEDED = "Succeeded"
FAILED = "Failed"
FAILURE_S_ = "Failure(s)"
TIMED_OUT = "TimedOut"
class TargetAvailability(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Target availability."""
AVAILABLE = "Available"
DEGRADED = "Degraded"
UNAVAILABLE = "Unavailable"
|
azure-quantum-python/azure-quantum/azure/quantum/_client/models/_enums.py/0
|
{
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/_client/models/_enums.py",
"repo_id": "azure-quantum-python",
"token_count": 959
}
| 347 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
from typing import TYPE_CHECKING, Any, Dict, Union
try:
import cirq
from cirq_ionq import Job as CirqIonqJob
from cirq_ionq.results import QPUResult, SimulatorResult
except ImportError:
raise ImportError(
"Missing optional 'cirq_ionq' dependency. \
To install run: pip install azure-quantum[cirq]")
from azure.quantum.target import IonQ
from azure.quantum.cirq.targets.target import Target as CirqTarget
if TYPE_CHECKING:
from azure.quantum import Workspace
from azure.quantum.job import Job as AzureJob
class _IonQClient:
"""Thin wrapper around Workspace to support cirq_ionq.Job"""
def __init__(self, workspace: "Workspace"):
self._workspace = workspace
@staticmethod
def _to_ionq_status(status: str):
from azure.quantum._client.models._enums import JobStatus
_STATUS_DICT = {
JobStatus.SUCCEEDED: 'completed',
JobStatus.CANCELLED: 'canceled',
JobStatus.FAILED: 'failed',
JobStatus.EXECUTING: 'running',
JobStatus.WAITING: 'ready'
}
return _STATUS_DICT.get(status, 'submitted')
def _create_job_dict(self, azure_job: "AzureJob"):
metadata = azure_job.details.input_params.copy()
metadata.update(azure_job.details.metadata or {})
if azure_job.has_completed():
results = azure_job.get_results()
else:
results = None
job_dict = {
"id": azure_job.id,
"name": azure_job.details.name,
"status": self._to_ionq_status(azure_job.details.status),
"data": results,
"metadata": metadata,
"target": azure_job.details.target,
"qubits": metadata.get("qubits"),
"failure": azure_job.details.error_data or ""
}
return job_dict
def get_job(self, job_id: str):
azure_job = self._workspace.get_job(job_id)
return self._create_job_dict(azure_job)
def cancel_job(self, job_id: str):
azure_job = self._workspace.get_job(job_id)
self._workspace.cancel_job(azure_job)
def delete_job(self, job_id: str):
azure_job = self._workspace.get_job(job_id)
self._workspace.cancel_job(azure_job)
class IonQTarget(IonQ, CirqTarget):
"""Base class for interfacing with an IonQ backend in Azure Quantum"""
def __init__(
self,
workspace: "Workspace",
name: str,
input_data_format: str = "ionq.circuit.v1",
output_data_format: str = "ionq.quantum-results.v1",
provider_id: str = "IonQ",
content_type: str = "application/json",
encoding: str = "",
**kwargs
):
self._client = _IonQClient(workspace)
super().__init__(
workspace=workspace,
name=name,
input_data_format=input_data_format,
output_data_format=output_data_format,
provider_id=provider_id,
content_type=content_type,
encoding=encoding,
**kwargs
)
@staticmethod
def _translate_cirq_circuit(circuit) -> Dict[str, Any]:
"""Translate Cirq circuit to IonQ JSON. If dependencies \
are not installed, throw error with installation instructions."""
from cirq_ionq import Serializer
return Serializer().serialize(circuit)
def _to_cirq_job(self, azure_job: "AzureJob") -> "CirqIonqJob":
"""Convert Azure job to Cirq job"""
job_dict = self._client._create_job_dict(azure_job)
return CirqIonqJob(client=self._client, job_dict=job_dict)
def estimate_cost(
self,
program: "cirq.Circuit",
repetitions: int,
price_1q: float = None,
price_2q: float = None,
min_price: float = None) -> float:
"""Estimate cost for running this program
:param program: Cirq quantum program
:type program: cirq.Circuit
:param repetitions: Number of repetitions
:type repetitions: int
:param price_1q: The price of running a single-qubit gate.
:type price_1q: float, optional
:param price_2q: The price of running a double-qubit gate.
:type price_2q: float, optional
:param min_price: The minimum price for running a job.
:type min_price: float, optional
:return: Price estimate
:rtype: float
"""
serialized_program = self._translate_cirq_circuit(program)
return super().estimate_cost(
serialized_program.body,
repetitions,
price_1q=price_1q,
price_2q=price_2q,
min_price=min_price
)
def submit(
self,
program: "cirq.Circuit",
name: str = "cirq-job",
repetitions: int = 500,
**kwargs
) -> "CirqIonqJob":
"""Submit a Cirq quantum circuit
:param program: Cirq circuit
:type program: cirq.Circuit
:param name: Job name
:type name: str
:param repetitions: Number of shots, defaults to
provider default value
:type repetitions: int
:return: Azure Quantum job
:rtype: Job
"""
serialized_program = self._translate_cirq_circuit(program)
metadata = serialized_program.metadata or {}
metadata["qubits"] = serialized_program.body["qubits"]
# Override metadata with value from kwargs
metadata.update(kwargs.get("metadata", {}))
azure_job = super().submit(
circuit=serialized_program.body,
name=name,
num_shots=repetitions,
metadata=metadata,
**kwargs
)
# Get Job shim to process results using cirq.Result
return self._to_cirq_job(azure_job=azure_job)
@staticmethod
def _to_cirq_result(
result: Union[QPUResult, SimulatorResult],
param_resolver: cirq.ParamResolverOrSimilarType = cirq.ParamResolver({}),
seed: cirq.RANDOM_STATE_OR_SEED_LIKE = None,
) -> "cirq.Result":
if isinstance(result, QPUResult):
return result.to_cirq_result(params=cirq.ParamResolver(param_resolver))
elif isinstance(result, SimulatorResult):
return result.to_cirq_result(params=cirq.ParamResolver(param_resolver), seed=seed)
raise ValueError("Result {result} not supported. \
Expecting either a cirq_ionq.results.QPUResult \
or cirq_ionq.results.SimulatorResult.")
|
azure-quantum-python/azure-quantum/azure/quantum/cirq/targets/ionq.py/0
|
{
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/cirq/targets/ionq.py",
"repo_id": "azure-quantum-python",
"token_count": 3013
}
| 348 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
from typing import TYPE_CHECKING, Dict
from azure.quantum.version import __version__
from azure.quantum.qiskit.job import AzureQuantumJob
from abc import abstractmethod
from .backend import (
AzureQirBackend,
_get_shots_or_deprecated_count_input_param,
)
from qiskit.providers.models import BackendConfiguration
from qiskit.providers import Options, Provider
QIR_BASIS_GATES = [
"measure",
"m",
"barrier",
"cx",
"cz",
"h",
"reset",
"rx",
"ry",
"rz",
"s",
"sdg",
"swap",
"t",
"tdg",
"x",
"y",
"z",
"id",
]
if TYPE_CHECKING:
from azure.quantum.qiskit import AzureQuantumProvider
import logging
logger = logging.getLogger(__name__)
__all__ = ["QCISimulatorBackend" "QCIQPUBackend"]
_DEFAULT_SHOTS_COUNT = 500
class QCIBackend(AzureQirBackend):
_SHOTS_PARAM_NAME = "shots"
@abstractmethod
def __init__(
self, configuration: BackendConfiguration, provider: Provider = None, **fields
):
super().__init__(configuration, provider, **fields)
@classmethod
def _default_options(cls) -> Options:
return Options(
**{
cls._SHOTS_PARAM_NAME: _DEFAULT_SHOTS_COUNT,
},
targetCapability="AdaptiveExecution",
)
def _azure_config(self) -> Dict[str, str]:
config = super()._azure_config()
config.update(
{
"provider_id": "qci",
}
)
return config
def run(
self,
run_input=None,
shots: int = None,
**options,
) -> AzureQuantumJob:
# In earlier versions, backends for all providers accepted the 'count' option,
# but now we accept it only for a compatibility reasons and do not recommend using it.
count = options.pop("count", None)
final_shots = _get_shots_or_deprecated_count_input_param(
param_name=self.__class__._SHOTS_PARAM_NAME,
shots=shots,
count=count,
)
return super().run(run_input, shots=final_shots, **options)
class QCISimulatorBackend(QCIBackend):
backend_names = ("qci.simulator", "qci.simulator.noisy")
def __init__(self, name: str, provider: "AzureQuantumProvider", **kwargs):
"""Base class for interfacing with an QCI Simulator backend"""
default_config = BackendConfiguration.from_dict(
{
"backend_name": name,
"backend_version": __version__,
"simulator": True,
"local": False,
"coupling_map": None,
"description": "QCI simulator on Azure Quantum",
"basis_gates": QIR_BASIS_GATES,
"memory": False,
"n_qubits": 29,
"conditional": True,
"max_shots": 1e6,
"max_experiments": 1,
"open_pulse": False,
"gates": [{"name": "TODO", "parameters": [], "qasm_def": "TODO"}],
"azure": self._azure_config(),
"is_default": True,
}
)
logger.info("Initializing QCISimulatorBackend")
configuration: BackendConfiguration = kwargs.pop(
"configuration", default_config
)
super().__init__(configuration=configuration, provider=provider, **kwargs)
class QCIQPUBackend(QCIBackend):
backend_names = ("qci.machine1",)
def __init__(self, name: str, provider: "AzureQuantumProvider", **kwargs):
"""Base class for interfacing with an QCI QPU backend"""
default_config = BackendConfiguration.from_dict(
{
"backend_name": name,
"backend_version": __version__,
"simulator": False,
"local": False,
"coupling_map": None,
"description": "QCI QPU on Azure Quantum",
"basis_gates": QIR_BASIS_GATES,
"memory": False,
"n_qubits": 11,
"conditional": True,
"max_shots": 10000,
"max_experiments": 1,
"open_pulse": False,
"gates": [{"name": "TODO", "parameters": [], "qasm_def": "TODO"}],
"azure": self._azure_config(),
"is_default": True,
}
)
logger.info("Initializing QCIQPUBackend")
configuration: BackendConfiguration = kwargs.pop(
"configuration", default_config
)
super().__init__(configuration=configuration, provider=provider, **kwargs)
|
azure-quantum-python/azure-quantum/azure/quantum/qiskit/backends/qci.py/0
|
{
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/qiskit/backends/qci.py",
"repo_id": "azure-quantum-python",
"token_count": 2315
}
| 349 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
__all__ = ['MicrosoftEstimatorResult']
from typing import Any, Dict, List, Optional, Union
import json
import markdown
class HTMLWrapper:
"""
Simple HTML wrapper to expose _repr_html_ for Jupyter clients.
"""
def __init__(self, content: str):
self.content = content
def _repr_html_(self):
return self.content
class MicrosoftEstimatorResult(dict):
"""
Microsoft Resource Estimator result.
Job results from the `microsoft.estimator` target are represented by
instances of this class. The class represents simple resource estimation
results as well as batching resource estimation results. The latter can
be indexed by an integer index to access an individual result from the
batching result.
"""
MAX_DEFAULT_ITEMS_IN_TABLE = 5
def __init__(self, data: Union[Dict, List]):
self._data = data
if isinstance(data, dict):
super().__init__(data)
self._is_simple = True
if MicrosoftEstimatorResult._is_succeeded(self):
self._repr = self._item_result_table()
self.summary = HTMLWrapper(self._item_result_summary_table())
self.diagram = EstimatorResultDiagram(self.data().copy())
elif isinstance(data, list):
super().__init__({idx: MicrosoftEstimatorResult(item_data)
for idx, item_data in enumerate(data)})
self._data = data
self._is_simple = False
num_items = len(data)
self._repr = ""
if num_items > self.MAX_DEFAULT_ITEMS_IN_TABLE:
self._repr += "<p><b>Info:</b> <i>The overview table is " \
"cut off after " \
f"{self.MAX_DEFAULT_ITEMS_IN_TABLE} items. If " \
"you want to see all items, suffix the result " \
"variable with <code>[:]</code></i></p>"
num_items = self.MAX_DEFAULT_ITEMS_IN_TABLE
self._repr += self._batch_result_table(range(num_items))
# Add plot function for batching jobs
self.plot = self._plot
self.summary_data_frame = self._summary_data_frame
def _is_succeeded(self):
return 'status' in self and self['status'] == "success"
def data(self, idx: Optional[int] = None) -> Any:
"""
Returns raw data of the result object.
In case of a batching job, you can pass an index to access a specific
item.
"""
if idx is None:
return self._data
elif not self._is_simple:
return self._data[idx]
else:
msg = "Cannot pass parameter 'idx' to 'data' for non-batching job"
raise ValueError(msg)
def _repr_html_(self):
"""
HTML table representation of the result.
"""
return self._repr
def __getitem__(self, key):
"""
If the result represents a batching job and key is a slice, a
side-by-side table comparison is shown for the indexes represented by
the slice.
Otherwise, the key is used to access the raw data directly.
"""
if isinstance(key, slice):
if self._is_simple:
msg = "Cannot pass slice to '__getitem__' for non-batching job"
raise ValueError(msg)
return HTMLWrapper(self._batch_result_table(range(len(self))[key]))
else:
return super().__getitem__(key)
def _plot(self, **kwargs):
"""
Plots all result items in a space time plot, where the x-axis shows
total runtime, and the y-axis shows total number of physical qubits.
Both axes are in log-scale.
Attributes:
labels (list): List of labels for the legend.
"""
try:
import matplotlib.pyplot as plt
except ImportError:
raise ImportError(
"Missing optional 'matplotlib' dependency. To install run: "
"pip install matplotlib"
)
labels = kwargs.pop("labels", [])
[xs, ys] = zip(*[
(self.data(i)['physicalCounts']['runtime'],
self.data(i)['physicalCounts']['physicalQubits'])
for i in range(len(self))])
_ = plt.figure(figsize=(15, 8))
plt.ylabel('Physical qubits')
plt.xlabel('Runtime')
plt.loglog()
for i, (x, y) in enumerate(zip(xs, ys)):
if isinstance(labels, list) and i < len(labels):
label = labels[i]
else:
label = str(i)
plt.scatter(x=[x], y=[y], label=label, marker="os+x"[i % 4])
nsec = 1
usec = 1e3 * nsec
msec = 1e3 * usec
sec = 1e3 * msec
min = 60 * sec
hour = 60 * min
day = 24 * hour
week = 7 * day
month = 31 * day
year = 365 * month
decade = 10 * year
century = 10 * decade
time_units = [
nsec, usec, msec, sec, min, hour, day, week,
month, year, decade, century]
time_labels = [
"1 ns", "1 µs", "1 ms", "1 s", "1 min", "1 hour", "1 day",
"1 week", "1 month", "1 year", "1 decade", "1 century"]
cutoff = next(
(i for i, x in enumerate(time_units) if x > max(xs)),
len(time_units) - 1) + 1
plt.xticks(time_units[0:cutoff], time_labels[0:cutoff], rotation=90)
plt.legend(loc="upper left")
plt.show()
@property
def call_graph(self):
"""
Shows the call graph of a simple resource estimation result with
profiling information.
"""
try:
import graphviz
except ImportError:
raise ImportError(
"Missing optional 'graphviz' dependency. To install run: "
"pip install graphviz"
)
if not self._is_simple:
raise ValueError("The `call_graph` method cannot be called on a "
"batching result, try indexing into the result "
"first")
if not hasattr(self, "_call_graph"):
from itertools import groupby
data = self.data().get("callGraph", None)
if data is None:
raise ValueError("The result does not contain any profiling "
"information. Set "
"`profiling.call_stack_depth` to some value")
g = graphviz.Digraph()
g.attr('node', shape='box', style='rounded, filled',
fontname='Arial', fontsize='10', margin='0.05,0.05',
height='0', width='0', fillcolor='#f6f6f6', color='#e3e3e3')
g.attr('edge', color='#d0d0d0')
nodes_indexed = [{**node, 'index': index}
for index, node in enumerate(data['nodes'])]
def sorter(node): return node['depth']
nodes_indexed.sort(key=sorter)
for _, nodes in groupby(nodes_indexed, sorter):
with g.subgraph() as s:
s.attr(rank='same')
for node in nodes:
s.node(str(node['index']), node['name'])
for edge in data['edges']:
g.edge(str(edge[0]), str(edge[1]))
self._call_graph = g
return self._call_graph
@property
def profile(self):
"""
"""
if not self._is_simple:
raise ValueError("The `call_graph` method cannot be called on a "
"batching result, try indexing into the result "
"first")
if not hasattr(self, "_profile"):
import base64
import json
profile = self.data().get("profile", None)
if profile is None:
raise ValueError("The result does not contain any profiling "
"information. Set "
"`profiling.call_stack_depth` to some value")
profile_encoded = json.dumps(profile).encode('utf-8')
data64 = base64.b64encode(profile_encoded).decode('utf-8')
self._profile = f"""
<a href="data:text/json;base64,{data64}" download="profile.json">
Download the profile</a> to your computer. Then open the profile
by dragging it into <a href="https://speedscope.app"
target="_blank">speedscope</a>.
"""
return HTMLWrapper(self._profile)
@property
def json(self):
"""
Returns a JSON representation of the resource estimation result data.
"""
if not hasattr(self, "_json"):
import json
self._json = json.dumps(self._data)
return self._json
def _summary_data_frame(self, **kwargs):
try:
import pandas as pd
except ImportError:
raise ImportError(
"Missing optional 'pandas' dependency. To install run: "
"pip install pandas"
)
# get labels or use default value, then extend with missing elements,
# and truncate extra elements
labels = kwargs.pop("labels", [])
labels.extend(range(len(labels), len(self)))
labels = labels[:len(self)]
def get_row(result):
if MicrosoftEstimatorResult._is_succeeded(result):
formatted = result["physicalCountsFormatted"]
return (
formatted["algorithmicLogicalQubits"],
formatted["logicalDepth"],
formatted["numTstates"],
result["logicalQubit"]["codeDistance"],
formatted["numTfactories"],
formatted["physicalQubitsForTfactoriesPercentage"],
formatted["physicalQubits"],
formatted["rqops"],
formatted["runtime"]
)
else:
return ['No solution found'] * 9
data = [get_row(self.data(index)) for index in range(len(self))]
columns = ["Logical qubits", "Logical depth", "T states",
"Code distance", "T factories", "T factory fraction",
"Physical qubits", "rQOPS", "Physical runtime"]
return pd.DataFrame(data, columns=columns, index=labels)
def _item_result_table(self):
html = ""
md = markdown.Markdown(extensions=['mdx_math'])
for group in self['reportData']['groups']:
html += f"""
<details {"open" if group['alwaysVisible'] else ""}>
<summary style="display:list-item">
<strong>{group['title']}</strong>
</summary>
<table>"""
for entry in group['entries']:
val = self
for key in entry['path'].split("/"):
val = val[key]
explanation = md.convert(entry["explanation"])
html += f"""
<tr>
<td style="font-weight: bold; vertical-align: top; white-space: nowrap">{entry['label']}</td>
<td style="vertical-align: top; white-space: nowrap">{val}</td>
<td style="text-align: left">
<strong>{entry["description"]}</strong>
<hr style="margin-top: 2px; margin-bottom: 0px; border-top: solid 1px black" />
{explanation}
</td>
</tr>
"""
html += "</table></details>"
html += f"<details><summary style=\"display:list-item\"><strong>Assumptions</strong></summary><ul>"
for assumption in self['reportData']['assumptions']:
html += f"<li>{md.convert(assumption)}</li>"
html += "</ul></details>"
return html
def _item_result_summary_table(self):
html = """
<style>
.aqre-tooltip {
position: relative;
border-bottom: 1px dotted black;
}
.aqre-tooltip .aqre-tooltiptext {
font-weight: normal;
visibility: hidden;
width: 600px;
background-color: #e0e0e0;
color: black;
text-align: center;
border-radius: 6px;
padding: 5px 5px;
position: absolute;
z-index: 1;
top: 150%;
left: 50%;
margin-left: -200px;
border: solid 1px black;
}
.aqre-tooltip .aqre-tooltiptext::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent transparent black transparent;
}
.aqre-tooltip:hover .aqre-tooltiptext {
visibility: visible;
}
</style>"""
md = markdown.Markdown(extensions=['mdx_math'])
for group in self['reportData']['groups']:
html += f"""
<details {"open" if group['alwaysVisible'] else ""}>
<summary style="display:list-item">
<strong>{group['title']}</strong>
</summary>
<table>"""
for entry in group['entries']:
val = self
for key in entry['path'].split("/"):
val = val[key]
explanation = md.convert(entry["explanation"])
html += f"""
<tr class="aqre-tooltip">
<td style="font-weight: bold"><span class="aqre-tooltiptext">{explanation}</span>{entry['label']}</td>
<td>{val}</td>
<td style="text-align: left">{entry["description"]}</td>
</tr>
"""
html += "</table></details>"
html += f"<details><summary style=\'display:list-item\'><strong>Assumptions</strong></summary><ul>"
for assumption in self['reportData']['assumptions']:
html += f"<li>{md.convert(assumption)}</li>"
html += "</ul></details>"
return html
def _batch_result_table(self, indices):
succeeded_item_indices = [i for i in indices if MicrosoftEstimatorResult._is_succeeded(self[i])]
if len(succeeded_item_indices) == 0:
print("None of the jobs succeeded")
return ""
first_succeeded_item_index = succeeded_item_indices[0]
html = ""
md = markdown.Markdown(extensions=['mdx_math'])
item_headers = "".join(f"<th>{i}</th>" for i in indices)
for group_index, group in enumerate(self[first_succeeded_item_index]['reportData']['groups']):
html += f"""
<details {"open" if group['alwaysVisible'] else ""}>
<summary style="display:list-item">
<strong>{group['title']}</strong>
</summary>
<table>
<thead><tr><th>Item</th>{item_headers}</tr></thead>"""
visited_entries = set()
for entry in [entry for index in succeeded_item_indices for entry in self[index]['reportData']['groups'][group_index]['entries']]:
label = entry['label']
if label in visited_entries:
continue
visited_entries.add(label)
html += f"""
<tr>
<td style="font-weight: bold; vertical-align: top; white-space: nowrap">{label}</td>
"""
for index in indices:
val = self[index]
if index in succeeded_item_indices:
for key in entry['path'].split("/"):
if key in val:
val = val[key]
else:
val = "N/A"
break
else:
val = "N/A"
html += f"""
<td style="vertical-align: top; white-space: nowrap">{val}</td>
"""
html += """
</tr>
"""
html += "</table></details>"
html += f"<details><summary style=\"display:list-item\"><strong>Assumptions</strong></summary><ul>"
for assumption in self[first_succeeded_item_index]['reportData']['assumptions']:
html += f"<li>{md.convert(assumption)}</li>"
html += "</ul></details>"
return html
@staticmethod
def _is_succeeded(obj):
return 'status' in obj and obj['status'] == "success"
class EstimatorResultDiagram:
def __init__(self, data):
data.pop("reportData")
self.data_json = json.dumps(data).replace(" ", "")
self.vis_lib = "https://cdn-aquavisualization-prod.azureedge.net/resource-estimation/index.js"
self.space = HTMLWrapper(self._space_diagram())
self.time = HTMLWrapper(self._time_diagram())
def _space_diagram(self):
html = f"""
<script src={self.vis_lib}></script>
<re-space-diagram data={self.data_json}></re-space-diagram>"""
return html
def _time_diagram(self):
html = f"""
<script src={self.vis_lib}></script>
<re-time-diagram data={self.data_json}></re-time-diagram>"""
return html
|
azure-quantum-python/azure-quantum/azure/quantum/target/microsoft/result.py/0
|
{
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/target/microsoft/result.py",
"repo_id": "azure-quantum-python",
"token_count": 9425
}
| 350 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
try
{
Push-Location (Join-Path $PSScriptRoot "../")
conda env create -f environment.yml
conda env update -f environment.yml --prune
conda activate azurequantum
pip install -e .[qiskit,cirq]
}
finally
{
Pop-Location
}
|
azure-quantum-python/azure-quantum/eng/Setup-Dev-Env.ps1/0
|
{
"file_path": "azure-quantum-python/azure-quantum/eng/Setup-Dev-Env.ps1",
"repo_id": "azure-quantum-python",
"token_count": 144
}
| 351 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '181'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- azsdk-python-identity/1.16.0 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-client-current-telemetry:
- 4|730,2|
x-client-os:
- win32
x-client-sku:
- MSAL.Python
x-client-ver:
- 1.28.0
method: POST
uri: https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token
response:
body:
string: '{"token_type": "Bearer", "expires_in": 1746121906, "ext_expires_in":
1746121906, "refresh_in": 31536000, "access_token": "PLACEHOLDER"}'
headers:
content-length:
- '135'
content-type:
- application/json; charset=utf-8
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/providerStatus?api-version=2022-09-12-preview&test-sequence-id=1
response:
body:
string: '{"value": [{"id": "microsoft-elements", "currentAvailability": "Available",
"targets": [{"id": "microsoft.dft", "currentAvailability": "Available", "averageQueueTime":
0, "statusPage": null}]}, {"id": "ionq", "currentAvailability": "Degraded",
"targets": [{"id": "ionq.qpu", "currentAvailability": "Available", "averageQueueTime":
494142, "statusPage": "https://status.ionq.co"}, {"id": "ionq.qpu.aria-1",
"currentAvailability": "Unavailable", "averageQueueTime": 737015, "statusPage":
"https://status.ionq.co"}, {"id": "ionq.qpu.aria-2", "currentAvailability":
"Unavailable", "averageQueueTime": 0, "statusPage": "https://status.ionq.co"},
{"id": "ionq.simulator", "currentAvailability": "Available", "averageQueueTime":
3, "statusPage": "https://status.ionq.co"}]}, {"id": "microsoft-qc", "currentAvailability":
"Available", "targets": [{"id": "microsoft.estimator", "currentAvailability":
"Available", "averageQueueTime": 0, "statusPage": null}]}, {"id": "pasqal",
"currentAvailability": "Degraded", "targets": [{"id": "pasqal.sim.emu-tn",
"currentAvailability": "Available", "averageQueueTime": 256, "statusPage":
"https://pasqal.com"}, {"id": "pasqal.qpu.fresnel", "currentAvailability":
"Degraded", "averageQueueTime": 0, "statusPage": "https://pasqal.com"}]},
{"id": "rigetti", "currentAvailability": "Degraded", "targets": [{"id": "rigetti.sim.qvm",
"currentAvailability": "Available", "averageQueueTime": 5, "statusPage": "https://rigetti.statuspage.io/"},
{"id": "rigetti.qpu.ankaa-2", "currentAvailability": "Degraded", "averageQueueTime":
5, "statusPage": "https://rigetti.statuspage.io/"}]}, {"id": "qci", "currentAvailability":
"Available", "targets": [{"id": "qci.simulator", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": "https://quantumcircuits.com"}, {"id":
"qci.machine1", "currentAvailability": "Available", "averageQueueTime": 1,
"statusPage": "https://quantumcircuits.com"}, {"id": "qci.simulator.noisy",
"currentAvailability": "Available", "averageQueueTime": 0, "statusPage": "https://quantumcircuits.com"}]},
{"id": "quantinuum", "currentAvailability": "Available", "targets": [{"id":
"quantinuum.qpu.h1-1", "currentAvailability": "Available", "averageQueueTime":
25016, "statusPage": "https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.sim.h1-1sc",
"currentAvailability": "Available", "averageQueueTime": 4, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-1e", "currentAvailability": "Available", "averageQueueTime":
27, "statusPage": "https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.qpu.h2-1",
"currentAvailability": "Available", "averageQueueTime": 349980, "statusPage":
"https://www.quantinuum.com/hardware/h2"}, {"id": "quantinuum.sim.h2-1sc",
"currentAvailability": "Available", "averageQueueTime": 0, "statusPage": "https://www.quantinuum.com/hardware/h2"},
{"id": "quantinuum.sim.h2-1e", "currentAvailability": "Available", "averageQueueTime":
487, "statusPage": "https://www.quantinuum.com/hardware/h2"}, {"id": "quantinuum.sim.h1-1sc-preview",
"currentAvailability": "Available", "averageQueueTime": 4, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-1e-preview", "currentAvailability": "Available",
"averageQueueTime": 27, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-2e-preview", "currentAvailability": "Available",
"averageQueueTime": 27901, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.qpu.h1-1-preview", "currentAvailability": "Available",
"averageQueueTime": 25016, "statusPage": "https://www.quantinuum.com/hardware/h1"}]},
{"id": "Microsoft.Test", "currentAvailability": "Available", "targets": [{"id":
"echo-rigetti", "currentAvailability": "Available", "averageQueueTime": 1,
"statusPage": ""}, {"id": "echo-quantinuum", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": ""}, {"id": "echo-qci", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}, {"id": "echo-ionq",
"currentAvailability": "Available", "averageQueueTime": 1, "statusPage": ""},
{"id": "echo-aquarius", "currentAvailability": "Available", "averageQueueTime":
1, "statusPage": ""}, {"id": "sparse-sim-rigetti", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}, {"id": "sparse-sim-quantinuum",
"currentAvailability": "Available", "averageQueueTime": 1, "statusPage": ""},
{"id": "sparse-sim-qci", "currentAvailability": "Available", "averageQueueTime":
1, "statusPage": ""}, {"id": "sparse-sim-ionq", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": ""}, {"id": "echo-output", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}]}], "nextLink": null}'
headers:
connection:
- keep-alive
content-length:
- '4774'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: 'b''{"containerName": "job-00000000-0000-0000-0000-000000000001"}'''
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '64'
Content-Type:
- application/json
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: POST
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/storage/sasUri?api-version=2022-09-12-preview&test-sequence-id=1
response:
body:
string: '{"sasUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl"}'
headers:
connection:
- keep-alive
content-length:
- '174'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-ms-date:
- Wed, 01 May 2024 17:51:48 GMT
x-ms-version:
- '2023-11-03'
method: GET
uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerNotFound</Code><Message>The
specified container does not exist.\nRequestId:45b8ea37-701e-0064-19f0-9bdd58000000\nTime:2024-05-01T17:51:50.4233229Z</Message></Error>"
headers:
content-length:
- '223'
content-type:
- application/xml
x-ms-version:
- '2023-11-03'
status:
code: 404
message: The specified container does not exist.
- request:
body: null
headers:
Accept:
- application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-ms-date:
- Wed, 01 May 2024 17:51:49 GMT
x-ms-version:
- '2023-11-03'
method: PUT
uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl
response:
body:
string: ''
headers:
content-length:
- '0'
x-ms-version:
- '2023-11-03'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-ms-date:
- Wed, 01 May 2024 17:51:49 GMT
x-ms-version:
- '2023-11-03'
method: GET
uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl
response:
body:
string: ''
headers:
content-length:
- '0'
x-ms-lease-state:
- available
x-ms-lease-status:
- unlocked
x-ms-version:
- '2023-11-03'
status:
code: 200
message: OK
- request:
body: 'b''BC\xc0\xde5\x14\x00\x00\x05\x00\x00\x00b\x0c0$JY\xbef\x8d\xfb\xb4\xaf\x0bQ\x80L\x01\x00\x00\x00!\x0c\x00\x00\x8a\x01\x00\x00\x0b\x02!\x00\x02\x00\x00\x00\x16\x00\x00\x00\x07\x81#\x91A\xc8\x04I\x06\x1029\x92\x01\x84\x0c%\x05\x08\x19\x1e\x04\x8bb\x80\x10E\x02B\x92\x0bB\x84\x102\x148\x08\x18K\n2B\x88Hp\xc4!#D\x12\x87\x8c\x10A\x92\x02d\xc8\x08\xb1\x14
CF\x88 \xc9\x012B\x84\x18*(*\x901|\xb0\\\x91 \xc4\xc8\x00\x00\x00\x89 \x00\x00\x11\x00\x00\x002"\x08\t
bF\x00!+$\x98\x10!%$\x98\x10\x19\''\x0c\x85\xa4\x90`Bd\\ $d\x82\xa0\x19\x010\x01P`\xa1R\x012\x8d\x11\x004F\x00\xa22\x03\x10\xd1\r\x04\xcc\x11\x80\xc1\x1cA0G\x00\n\x00\x00Q\x18\x00\x00(\x00\x00\x00\x1b\xd6!\xf8\xff\xff\xff\xffa(\x07w\xa0\x07y\xc8\x87_\x80\x87wH\x07w\xa0\x07`x\x87z\xa0\x07x\xa8\x07z\xf8\x05v\x08\x07q(\x07vH\x07w8\x87_\x98\x87q@\x87rh\x87p\x00\x88xH\x07y\xf8\x05x\x90\x87w0\x87t`\x87r\x98\x07`\x1c\xeaa\x1e\xe8\xe1\x1d\xda\x01
\xe4\xa1\x1c\xe2\xa1\x1e\xd2A\x1e\xca\x81\x1c~\xc1\x1d\xea\xa1\x1d~!\x1e\xeaA\x1c\xd2\x81\x1e\xe6\x01\x98\x03\x80\x90\x87r\x88\x87zH\x07y(\x07r\xf8\x05w\xa8\x87v\xf8\x05y(\x87y\xa8\x07v\xa0\x87y\x00\xe0\x00\x00\x00\x00\x00I\x18\x00\x00\x01\x00\x00\x00\x13\x82\x00\x00\x1a!\x0cY\x04\xc0$\x1cC*`\t\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16`H\xb5\\\x05\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x02\x0c\xa9\xc4@;\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16`H\xc5\x07V\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x12\x1b\x04\x8a:\x06\x00\x00d\x81\x00\x00\x07\x00\x00\x002\x1e\x98\x10\x19\x11L\x90\x8c\t&G\xc6\x04C\xd2\x12(\x87\x11\x00\xda\x11\x00\x00\x00\x00\x00\xb1\x18\x00\x00\x97\x00\x00\x003\x08\x80\x1c\xc4\xe1\x1cf\x14\x01=\x88C8\x84\xc3\x8cB\x80\x07yx\x07s\x98q\x0c\xe6\x00\x0f\xed\x10\x0e\xf4\x80\x0e3\x0cB\x1e\xc2\xc1\x1d\xce\xa1\x1cf0\x05=\x88C8\x84\x83\x1b\xcc\x03=\xc8C=\x8c\x03=\xccx\x8ctp\x07{\x08\x07yH\x87pp\x07zp\x03vx\x87p
\x87\x19\xcc\x11\x0e\xec\x90\x0e\xe10\x0fn0\x0f\xe3\xf0\x0e\xf0P\x0e3\x10\xc4\x1d\xde!\x1c\xd8!\x1d\xc2a\x1ef0\x89;\xbc\x83;\xd0C9\xb4\x03<\xbc\x83<\x84\x03;\xcc\xf0\x14v`\x07{h\x077h\x87rh\x077\x80\x87p\x90\x87p`\x07v(\x07v\xf8\x05vx\x87w\x80\x87_\x08\x87q\x18\x87r\x98\x87y\x98\x81,\xee\xf0\x0e\xee\xe0\x0e\xf5\xc0\x0e\xec0\x03b\xc8\xa1\x1c\xe4\xa1\x1c\xcc\xa1\x1c\xe4\xa1\x1c\xdca\x1c\xca!\x1c\xc4\x81\x1d\xcaa\x06\xd6\x90C9\xc8C9\x98C9\xc8C9\xb8\xc38\x94C8\x88\x03;\x94\xc3/\xbc\x83<\xfc\x82;\xd4\x03;\xb0\xc3\x0c\xc7i\x87pX\x87rp\x83th\x07x`\x87t\x18\x87t\xa0\x87\x19\xceS\x0f\xee\x00\x0f\xf2P\x0e\xe4\x90\x0e\xe3@\x0f\xe1
\x0e\xecP\x0e3 (\x1d\xdc\xc1\x1e\xc2A\x1e\xd2!\x1c\xdc\x81\x1e\xdc\xe0\x1c\xe4\xe1\x1d\xea\x01\x1ef\x18Q8\xb0C:\x9c\x83;\xccP$v`\x07{h\x077`\x87wx\x07x\x98QL\xf4\x90\x0f\xf0P\x0e3\x1ej\x1e\xcaa\x1c\xe8!\x1d\xde\xc1\x1d~\x01\x1e\xe4\xa1\x1c\xcc!\x1d\xf0a\x06T\x85\x838\xcc\xc3;\xb0C=\xd0C9\xfc\xc2<\xe4C;\x88\xc3;\xb0\xc3\x8c\xc5\n\x87y\x98\x87w\x18\x87t\x08\x07z(\x07r\x98\x81\\\xe3\x10\x0e\xec\xc0\x0e\xe5P\x0e\xf30#\xc1\xd2A\x1e\xe4\xe1\x17\xd8\xe1\x1d\xde\x01\x1efH\x19;\xb0\x83=\xb4\x83\x1b\x84\xc38\x8cC9\xcc\xc3<\xb8\xc19\xc8\xc3;\xd4\x03<\xccH\xb4q\x08\x07v`\x07q\x08\x87qX\x87\x19\xdb\xc6\x0e\xec`\x0f\xed\xe0\x06\xf0
\x0f\xe50\x0f\xe5 \x0f\xf6P\x0en\x10\x0e\xe30\x0e\xe50\x0f\xf3\xe0\x06\xe9\xe0\x0e\xe4P\x0e\xf80#\xe2\xeca\x1c\xc2\x81\x1d\xd8\xe1\x17\xec!\x1d\xe6!\x1d\xc4!\x1d\xd8!\x1d\xe8!\x1ff
\x9d;\xbcC=\xb8\x039\x94\x839\xccX\xbcpp\x07wx\x07z\x08\x07zH\x87wp\x07\x00\x00y
\x00\x00.\x00\x00\x00r\x1eH C\x88\x0c\x19\tr2H #\x81\x8c\x91\x91\xd1D\xa0\x10(d<12B\x8e\x90!\xa3H\x10\xb7\x00Q\x84e\x00qir_major_versionqir_minor_versiondynamic_qubit_managementdynamic_result_management\x00#\x08\n1\x82\xa0\x14#\x08\x8a1\x82\xb0\x1c3\x0cEP\xcc0\x18\xc21\xc3P\x0c\xc8\x0cCA
2\x12\x98\xa0\x8c\xd8\xd8\xec\xda\\\xda\xde\xc8\xea\xd8\xca\\\xcc\xd8\xc2\xce\xe6F!\x90DY\x00\x00\xa9\x18\x00\x00!\x00\x00\x00\x0b\nr(\x87w\x80\x07zXp\x98C=\xb8\xc38\xb0C9\xd0\xc3\x82\xe6\x1c\xc6\xa1\r\xe8A\x1e\xc2\xc1\x1d\xe6!\x1d\xe8!\x1d\xde\xc1\x1d\x164\xe3`\x0e\xe7P\x0f\xe1
\x0f\xe4@\x0f\xe1 \x0f\xe7P\x0e\xf4\xb0\x80\x81\x07y(\x87p`\x07vx\x87q\x08\x07z(\x07rXp\x9c\xc38\xb4\x01;\xa4\x83=\x94\xc3\x02k\x1c\xd8!\x1c\xdc\xe1\x1c\xdc
\x1c\xe4a\x1c\xdc \x1c\xe8\x81\x1e\xc2a\x1c\xd0\xa1\x1c\xc8a\x1c\xc2\x81\x1d\xd8\x01\xd1\x10\x00\x00\x06\x00\x00\x00\x07\xcc<\xa4\x83;\x9c\x03;\x94\x03=\xa0\x83<\x94C8\x90\xc3\x01\x00\x00\x00a
\x00\x00\x16\x00\x00\x00\x13\x04A,\x10\x00\x00\x00\x03\x00\x00\x00\xc4%@d\xca\x08#\x00\x00\x00\x00\x00#\x06\x05\x00\x82`P(\xc1\x88A\x01\x80
\x18\x14\x8a0b`\x00 \x08\x06G\x12\x08#\x06\x05\x00\x82`P \xc2\x88\x81\x01\x80
\x18\x1cI h8\x10\x02\x00\x00\x00\x07P\x10\xcd\x14a\x00\x00\x00\x00\x00\x00q
\x00\x00\x03\x00\x00\x002\x0e\x10"\x84\x00\xf6\x02\x00\x00\x00\x00\x00\x00\x00\x00]\x0c\x00\x00%\x00\x00\x00\x12\x03\x94&\x01\x00\x00\x00circuit-194__quantum__qis__t__body__quantum__qis__cnot__body__quantum__qis__t__adj14.0.6
f28c006a5895fc0e329fe15fead81e37457cb1d1batch\x00\x00\x00\x00\x00\x00'''
headers:
Accept:
- application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '4895'
Content-Type:
- application/octet-stream
User-Agent:
- azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-ms-blob-type:
- BlockBlob
x-ms-date:
- Wed, 01 May 2024 17:51:50 GMT
x-ms-version:
- '2023-11-03'
method: PUT
uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl
response:
body:
string: ''
headers:
content-length:
- '0'
x-ms-version:
- '2023-11-03'
status:
code: 201
message: Created
- request:
body: 'b''{"id": "00000000-0000-0000-0000-000000000001", "name": "circuit-194",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "itemType": "Job",
"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit": "True",
"name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "outputDataFormat":
"microsoft.resource-estimates.v1"}'''
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '802'
Content-Type:
- application/json
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: PUT
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=1
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net:443/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
null, "errorData": null, "isCancelling": false, "tags": [], "name": "circuit-194",
"id": "00000000-0000-0000-0000-000000000001", "providerId": "microsoft-qc",
"target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1305'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=1
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=2
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=3
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=4
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=5
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=6
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": null, "cancellationTime": null, "quantumComputingData":
{"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name":
"circuit-194", "id": "00000000-0000-0000-0000-000000000001", "providerId":
"microsoft-qc", "target": "microsoft.estimator", "creationTime": "2024-05-01T17:51:52.5171488+00:00",
"endExecutionTime": null, "costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1544'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=7
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Executing", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:53.1375441Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": null, "costEstimate":
null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1572'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=8
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=9
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=10
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/providerStatus?api-version=2022-09-12-preview&test-sequence-id=2
response:
body:
string: '{"value": [{"id": "microsoft-elements", "currentAvailability": "Available",
"targets": [{"id": "microsoft.dft", "currentAvailability": "Available", "averageQueueTime":
0, "statusPage": null}]}, {"id": "ionq", "currentAvailability": "Degraded",
"targets": [{"id": "ionq.qpu", "currentAvailability": "Available", "averageQueueTime":
494142, "statusPage": "https://status.ionq.co"}, {"id": "ionq.qpu.aria-1",
"currentAvailability": "Unavailable", "averageQueueTime": 737015, "statusPage":
"https://status.ionq.co"}, {"id": "ionq.qpu.aria-2", "currentAvailability":
"Unavailable", "averageQueueTime": 0, "statusPage": "https://status.ionq.co"},
{"id": "ionq.simulator", "currentAvailability": "Available", "averageQueueTime":
3, "statusPage": "https://status.ionq.co"}]}, {"id": "microsoft-qc", "currentAvailability":
"Available", "targets": [{"id": "microsoft.estimator", "currentAvailability":
"Available", "averageQueueTime": 0, "statusPage": null}]}, {"id": "pasqal",
"currentAvailability": "Degraded", "targets": [{"id": "pasqal.sim.emu-tn",
"currentAvailability": "Available", "averageQueueTime": 256, "statusPage":
"https://pasqal.com"}, {"id": "pasqal.qpu.fresnel", "currentAvailability":
"Degraded", "averageQueueTime": 0, "statusPage": "https://pasqal.com"}]},
{"id": "rigetti", "currentAvailability": "Degraded", "targets": [{"id": "rigetti.sim.qvm",
"currentAvailability": "Available", "averageQueueTime": 5, "statusPage": "https://rigetti.statuspage.io/"},
{"id": "rigetti.qpu.ankaa-2", "currentAvailability": "Degraded", "averageQueueTime":
5, "statusPage": "https://rigetti.statuspage.io/"}]}, {"id": "qci", "currentAvailability":
"Available", "targets": [{"id": "qci.simulator", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": "https://quantumcircuits.com"}, {"id":
"qci.machine1", "currentAvailability": "Available", "averageQueueTime": 1,
"statusPage": "https://quantumcircuits.com"}, {"id": "qci.simulator.noisy",
"currentAvailability": "Available", "averageQueueTime": 0, "statusPage": "https://quantumcircuits.com"}]},
{"id": "quantinuum", "currentAvailability": "Available", "targets": [{"id":
"quantinuum.qpu.h1-1", "currentAvailability": "Available", "averageQueueTime":
25016, "statusPage": "https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.sim.h1-1sc",
"currentAvailability": "Available", "averageQueueTime": 4, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-1e", "currentAvailability": "Available", "averageQueueTime":
27, "statusPage": "https://www.quantinuum.com/hardware/h1"}, {"id": "quantinuum.qpu.h2-1",
"currentAvailability": "Available", "averageQueueTime": 349980, "statusPage":
"https://www.quantinuum.com/hardware/h2"}, {"id": "quantinuum.sim.h2-1sc",
"currentAvailability": "Available", "averageQueueTime": 0, "statusPage": "https://www.quantinuum.com/hardware/h2"},
{"id": "quantinuum.sim.h2-1e", "currentAvailability": "Available", "averageQueueTime":
487, "statusPage": "https://www.quantinuum.com/hardware/h2"}, {"id": "quantinuum.sim.h1-1sc-preview",
"currentAvailability": "Available", "averageQueueTime": 4, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-1e-preview", "currentAvailability": "Available",
"averageQueueTime": 27, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.sim.h1-2e-preview", "currentAvailability": "Available",
"averageQueueTime": 27901, "statusPage": "https://www.quantinuum.com/hardware/h1"},
{"id": "quantinuum.qpu.h1-1-preview", "currentAvailability": "Available",
"averageQueueTime": 25016, "statusPage": "https://www.quantinuum.com/hardware/h1"}]},
{"id": "Microsoft.Test", "currentAvailability": "Available", "targets": [{"id":
"echo-rigetti", "currentAvailability": "Available", "averageQueueTime": 1,
"statusPage": ""}, {"id": "echo-quantinuum", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": ""}, {"id": "echo-qci", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}, {"id": "echo-ionq",
"currentAvailability": "Available", "averageQueueTime": 1, "statusPage": ""},
{"id": "echo-aquarius", "currentAvailability": "Available", "averageQueueTime":
1, "statusPage": ""}, {"id": "sparse-sim-rigetti", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}, {"id": "sparse-sim-quantinuum",
"currentAvailability": "Available", "averageQueueTime": 1, "statusPage": ""},
{"id": "sparse-sim-qci", "currentAvailability": "Available", "averageQueueTime":
1, "statusPage": ""}, {"id": "sparse-sim-ionq", "currentAvailability": "Available",
"averageQueueTime": 1, "statusPage": ""}, {"id": "echo-output", "currentAvailability":
"Available", "averageQueueTime": 1, "statusPage": ""}]}], "nextLink": null}'
headers:
connection:
- keep-alive
content-length:
- '4774'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=11
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=12
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=13
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp-azure-quantum-qiskit azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=14
response:
body:
string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl",
"inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.input.json",
"inputDataFormat": "qir.v1", "inputParams": {"errorBudget": 0.001, "qubitParams":
{"name": "qubit_gate_ns_e3"}, "qecScheme": {"name": "surface_code"}, "items":
[{"entryPoint": "circuit-194", "arguments": []}]}, "metadata": {"qiskit":
"True", "name": "circuit-194", "num_qubits": "3", "metadata": "{}"}, "sessionId":
null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat":
"microsoft.resource-estimates.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json",
"beginExecutionTime": "2024-05-01T17:51:57.0369485Z", "cancellationTime":
null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling":
false, "tags": [], "name": "circuit-194", "id": "00000000-0000-0000-0000-000000000001",
"providerId": "microsoft-qc", "target": "microsoft.estimator", "creationTime":
"2024-05-01T17:51:52.5171488+00:00", "endExecutionTime": "2024-05-01T17:51:59.2293738Z",
"costEstimate": null, "itemType": "Job"}'
headers:
connection:
- keep-alive
content-length:
- '1601'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-ms-date:
- Wed, 01 May 2024 17:52:02 GMT
x-ms-range:
- bytes=0-33554431
x-ms-version:
- '2023-11-03'
method: GET
uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dcircuit-194-00000000-0000-0000-0000-000000000001.output.json
response:
body:
string: '{"status": "success", "jobParams": {"qecScheme": {"name": "surface_code",
"errorCorrectionThreshold": 0.01, "crossingPrefactor": 0.03, "logicalCycleTime":
"(4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance", "physicalQubitsPerLogicalQubit":
"2 * codeDistance * codeDistance", "maxCodeDistance": 50}, "errorBudget":
0.001, "qubitParams": {"instructionSet": "GateBased", "name": "qubit_gate_ns_e3",
"oneQubitMeasurementTime": "100 ns", "oneQubitGateTime": "50 ns", "twoQubitGateTime":
"50 ns", "tGateTime": "50 ns", "oneQubitMeasurementErrorRate": 0.001, "oneQubitGateErrorRate":
0.001, "twoQubitGateErrorRate": 0.001, "tGateErrorRate": 0.001, "idleErrorRate":
0.001}}, "physicalCounts": {"physicalQubits": 12642, "runtime": 36400, "rqops":
3214286, "breakdown": {"algorithmicLogicalQubits": 9, "algorithmicLogicalDepth":
3, "logicalDepth": 13, "numTstates": 3, "clockFrequency": 357142.85714285716,
"numTfactories": 3, "numTfactoryRuns": 1, "physicalQubitsForTfactories": 11760,
"physicalQubitsForAlgorithm": 882, "requiredLogicalQubitErrorRate": 1.8518518518518518e-05,
"requiredLogicalTstateErrorRate": 0.00016666666666666666, "numTsPerRotation":
null, "cliffordErrorRate": 0.001}}, "physicalCountsFormatted": {"runtime":
"36 microsecs", "rqops": "3.21M", "physicalQubits": "12.64k", "algorithmicLogicalQubits":
"9", "algorithmicLogicalDepth": "3", "logicalDepth": "13", "numTstates": "3",
"numTfactories": "3", "numTfactoryRuns": "1", "physicalQubitsForAlgorithm":
"882", "physicalQubitsForTfactories": "11.76k", "physicalQubitsForTfactoriesPercentage":
"93.02 %", "requiredLogicalQubitErrorRate": "1.85e-5", "requiredLogicalTstateErrorRate":
"1.67e-4", "physicalQubitsPerLogicalQubit": "98", "logicalCycleTime": "3 microsecs",
"clockFrequency": "357.14k", "logicalErrorRate": "3.00e-6", "tfactoryPhysicalQubits":
"3.92k", "tfactoryRuntime": "36 microsecs", "numInputTstates": "30", "numUnitsPerRound":
"2", "unitNamePerRound": "15-to-1 space efficient", "codeDistancePerRound":
"7", "physicalQubitsPerRound": "3.92k", "tfactoryRuntimePerRound": "36 microsecs",
"tstateLogicalErrorRate": "2.13e-5", "logicalCountsNumQubits": "2", "logicalCountsTCount":
"3", "logicalCountsRotationCount": "0", "logicalCountsRotationDepth": "0",
"logicalCountsCczCount": "0", "logicalCountsCcixCount": "0", "logicalCountsMeasurementCount":
"0", "errorBudget": "1.00e-3", "errorBudgetLogical": "5.00e-4", "errorBudgetTstates":
"5.00e-4", "errorBudgetRotations": "0.00e0", "numTsPerRotation": "No rotations
in algorithm", "logicalDepthFactor": "constraint not set", "maxTFactories":
"constraint not set", "maxDuration": "constraint not set", "maxPhysicalQubits":
"constraint not set"}, "logicalQubit": {"codeDistance": 7, "physicalQubits":
98, "logicalCycleTime": 2800, "logicalErrorRate": 3.0000000000000013e-06},
"tfactory": {"physicalQubits": 3920, "runtime": 36400, "numTstates": 1, "numInputTstates":
30, "numRounds": 1, "numUnitsPerRound": [2], "unitNamePerRound": ["15-to-1
space efficient"], "codeDistancePerRound": [7], "physicalQubitsPerRound":
[3920], "runtimePerRound": [36400], "logicalErrorRate": 2.133500000000001e-05},
"errorBudget": {"logical": 0.0005, "tstates": 0.0005, "rotations": 0.0}, "logicalCounts":
{"numQubits": 2, "tCount": 3, "rotationCount": 0, "rotationDepth": 0, "cczCount":
0, "ccixCount": 0, "measurementCount": 0}, "reportData": {"groups": [{"title":
"Physical resource estimates", "alwaysVisible": true, "entries": [{"path":
"physicalCountsFormatted/runtime", "label": "Runtime", "description": "Total
runtime", "explanation": "This is a runtime estimate for the execution time
of the algorithm. In general, the execution time corresponds to the duration
of one logical cycle (2,800 nanosecs) multiplied by the 3 logical cycles to
run the algorithm. If however the duration of a single T factory (here: 36,400
nanosecs) is larger than the algorithm runtime, we extend the number of logical
cycles artificially in order to exceed the runtime of a single T factory."},
{"path": "physicalCountsFormatted/rqops", "label": "rQOPS", "description":
"Reliable quantum operations per second", "explanation": "The value is computed
as the number of logical qubits after layout (9) (with a logical error rate
of 1.85e-5) multiplied by the clock frequency (357,142.86), which is the number
of logical cycles per second."}, {"path": "physicalCountsFormatted/physicalQubits",
"label": "Physical qubits", "description": "Number of physical qubits", "explanation":
"This value represents the total number of physical qubits, which is the sum
of 882 physical qubits to implement the algorithm logic, and 11,760 physical
qubits to execute the T factories that are responsible to produce the T states
that are consumed by the algorithm."}]}, {"title": "Resource estimates breakdown",
"alwaysVisible": false, "entries": [{"path": "physicalCountsFormatted/algorithmicLogicalQubits",
"label": "Logical algorithmic qubits", "description": "Number of logical qubits
for the algorithm after layout", "explanation": "Laying out the logical qubits
in the presence of nearest-neighbor constraints requires additional logical
qubits. In particular, to layout the $Q_{\\rm alg} = 2$ logical qubits in
the input algorithm, we require in total $2 \\cdot Q_{\\rm alg} + \\lceil
\\sqrt{8 \\cdot Q_{\\rm alg}}\\rceil + 1 = 9$ logical qubits."}, {"path":
"physicalCountsFormatted/algorithmicLogicalDepth", "label": "Algorithmic depth",
"description": "Number of logical cycles for the algorithm", "explanation":
"To execute the algorithm using _Parallel Synthesis Sequential Pauli Computation_
(PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements,
for which assume an execution time of one logical cycle. Based on the input
algorithm, we require one multi-qubit measurement for the 0 single-qubit measurements,
the 0 arbitrary single-qubit rotations, and the 3 T gates, three multi-qubit
measurements for each of the 0 CCZ and 0 CCiX gates in the input program,
as well as No rotations in algorithm multi-qubit measurements for each of
the 0 non-Clifford layers in which there is at least one single-qubit rotation
with an arbitrary angle rotation."}, {"path": "physicalCountsFormatted/logicalDepth",
"label": "Logical depth", "description": "Number of logical cycles performed",
"explanation": "This number is usually equal to the logical depth of the algorithm,
which is 3. However, in the case in which a single T factory is slower than
the execution time of the algorithm, we adjust the logical cycle depth to
exceed the T factory''s execution time."}, {"path": "physicalCountsFormatted/clockFrequency",
"label": "Clock frequency", "description": "Number of logical cycles per second",
"explanation": "This is the number of logical cycles that can be performed
within one second. The logical cycle time is 3 microsecs."}, {"path": "physicalCountsFormatted/numTstates",
"label": "Number of T states", "description": "Number of T states consumed
by the algorithm", "explanation": "To execute the algorithm, we require one
T state for each of the 3 T gates, four T states for each of the 0 CCZ and
0 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit
rotation gates with arbitrary angle rotation."}, {"path": "physicalCountsFormatted/numTfactories",
"label": "Number of T factories", "description": "Number of T factories capable
of producing the demanded 3 T states during the algorithm''s runtime", "explanation":
"The total number of T factories 3 that are executed in parallel is computed
as $\\left\\lceil\\dfrac{\\text{T states}\\cdot\\text{T factory duration}}{\\text{T
states per T factory}\\cdot\\text{algorithm runtime}}\\right\\rceil = \\left\\lceil\\dfrac{3
\\cdot 36,400\\;\\text{ns}}{1 \\cdot 36,400\\;\\text{ns}}\\right\\rceil$"},
{"path": "physicalCountsFormatted/numTfactoryRuns", "label": "Number of T
factory invocations", "description": "Number of times all T factories are
invoked", "explanation": "In order to prepare the 3 T states, the 3 copies
of the T factory are repeatedly invoked 1 times."}, {"path": "physicalCountsFormatted/physicalQubitsForAlgorithm",
"label": "Physical algorithmic qubits", "description": "Number of physical
qubits for the algorithm after layout", "explanation": "The 882 are the product
of the 9 logical qubits after layout and the 98 physical qubits that encode
a single logical qubit."}, {"path": "physicalCountsFormatted/physicalQubitsForTfactories",
"label": "Physical T factory qubits", "description": "Number of physical qubits
for the T factories", "explanation": "Each T factory requires 3,920 physical
qubits and we run 3 in parallel, therefore we need $11,760 = 3,920 \\cdot
3$ qubits."}, {"path": "physicalCountsFormatted/requiredLogicalQubitErrorRate",
"label": "Required logical qubit error rate", "description": "The minimum
logical qubit error rate required to run the algorithm within the error budget",
"explanation": "The minimum logical qubit error rate is obtained by dividing
the logical error probability 5.00e-4 by the product of 9 logical qubits and
the total cycle count 13."}, {"path": "physicalCountsFormatted/requiredLogicalTstateErrorRate",
"label": "Required logical T state error rate", "description": "The minimum
T state error rate required for distilled T states", "explanation": "The minimum
T state error rate is obtained by dividing the T distillation error probability
5.00e-4 by the total number of T states 3."}, {"path": "physicalCountsFormatted/numTsPerRotation",
"label": "Number of T states per rotation", "description": "Number of T states
to implement a rotation with an arbitrary angle", "explanation": "The number
of T states to implement a rotation with an arbitrary angle is $\\lceil 0.53
\\log_2(0 / 0) + 5.3\\rceil$ [[arXiv:2203.10064](https://arxiv.org/abs/2203.10064)]. For
simplicity, we use this formula for all single-qubit arbitrary angle rotations,
and do not distinguish between best, worst, and average cases."}]}, {"title":
"Logical qubit parameters", "alwaysVisible": false, "entries": [{"path": "jobParams/qecScheme/name",
"label": "QEC scheme", "description": "Name of QEC scheme", "explanation":
"You can load pre-defined QEC schemes by using the name `surface_code` or
`floquet_code`. The latter only works with Majorana qubits."}, {"path": "logicalQubit/codeDistance",
"label": "Code distance", "description": "Required code distance for error
correction", "explanation": "The code distance is the smallest odd integer
greater or equal to $\\dfrac{2\\log(0.03 / 0.000018518518518518518)}{\\log(0.01/0.001)}
- 1$"}, {"path": "physicalCountsFormatted/physicalQubitsPerLogicalQubit",
"label": "Physical qubits", "description": "Number of physical qubits per
logical qubit", "explanation": "The number of physical qubits per logical
qubit are evaluated using the formula 2 * codeDistance * codeDistance that
can be user-specified."}, {"path": "physicalCountsFormatted/logicalCycleTime",
"label": "Logical cycle time", "description": "Duration of a logical cycle
in nanoseconds", "explanation": "The runtime of one logical cycle in nanoseconds
is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime)
* codeDistance that can be user-specified."}, {"path": "physicalCountsFormatted/logicalErrorRate",
"label": "Logical qubit error rate", "description": "Logical qubit error rate",
"explanation": "The logical qubit error rate is computed as $0.03 \\cdot \\left(\\dfrac{0.001}{0.01}\\right)^\\frac{7
+ 1}{2}$"}, {"path": "jobParams/qecScheme/crossingPrefactor", "label": "Crossing
prefactor", "description": "Crossing prefactor used in QEC scheme", "explanation":
"The crossing prefactor is usually extracted numerically from simulations
when fitting an exponential curve to model the relationship between logical
and physical error rate."}, {"path": "jobParams/qecScheme/errorCorrectionThreshold",
"label": "Error correction threshold", "description": "Error correction threshold
used in QEC scheme", "explanation": "The error correction threshold is the
physical error rate below which the error rate of the logical qubit is less
than the error rate of the physical qubit that constitute it. This value
is usually extracted numerically from simulations of the logical error rate."},
{"path": "jobParams/qecScheme/logicalCycleTime", "label": "Logical cycle time
formula", "description": "QEC scheme formula used to compute logical cycle
time", "explanation": "This is the formula that is used to compute the logical
cycle time 2,800 ns."}, {"path": "jobParams/qecScheme/physicalQubitsPerLogicalQubit",
"label": "Physical qubits formula", "description": "QEC scheme formula used
to compute number of physical qubits per logical qubit", "explanation": "This
is the formula that is used to compute the number of physical qubits per logical
qubits 98."}]}, {"title": "T factory parameters", "alwaysVisible": false,
"entries": [{"path": "physicalCountsFormatted/tfactoryPhysicalQubits", "label":
"Physical qubits", "description": "Number of physical qubits for a single
T factory", "explanation": "This corresponds to the maximum number of physical
qubits over all rounds of T distillation units in a T factory. A round of
distillation contains of multiple copies of distillation units to achieve
the required success probability of producing a T state with the expected
logical T state error rate."}, {"path": "physicalCountsFormatted/tfactoryRuntime",
"label": "Runtime", "description": "Runtime of a single T factory", "explanation":
"The runtime of a single T factory is the accumulated runtime of executing
each round in a T factory."}, {"path": "tfactory/numTstates", "label": "Number
of output T states per run", "description": "Number of output T states produced
in a single run of T factory", "explanation": "The T factory takes as input
30 noisy physical T states with an error rate of 0.001 and produces 1 T states
with an error rate of 2.13e-5."}, {"path": "physicalCountsFormatted/numInputTstates",
"label": "Number of input T states per run", "description": "Number of physical
input T states consumed in a single run of a T factory", "explanation": "This
value includes the physical input T states of all copies of the distillation
unit in the first round."}, {"path": "tfactory/numRounds", "label": "Distillation
rounds", "description": "The number of distillation rounds", "explanation":
"This is the number of distillation rounds. In each round one or multiple
copies of some distillation unit is executed."}, {"path": "physicalCountsFormatted/numUnitsPerRound",
"label": "Distillation units per round", "description": "The number of units
in each round of distillation", "explanation": "This is the number of copies
for the distillation units per round."}, {"path": "physicalCountsFormatted/unitNamePerRound",
"label": "Distillation units", "description": "The types of distillation units",
"explanation": "These are the types of distillation units that are executed
in each round. The units can be either physical or logical, depending on
what type of qubit they are operating. Space-efficient units require fewer
qubits for the cost of longer runtime compared to Reed-Muller preparation
units."}, {"path": "physicalCountsFormatted/codeDistancePerRound", "label":
"Distillation code distances", "description": "The code distance in each round
of distillation", "explanation": "This is the code distance used for the units
in each round. If the code distance is 1, then the distillation unit operates
on physical qubits instead of error-corrected logical qubits."}, {"path":
"physicalCountsFormatted/physicalQubitsPerRound", "label": "Number of physical
qubits per round", "description": "The number of physical qubits used in each
round of distillation", "explanation": "The maximum number of physical qubits
over all rounds is the number of physical qubits for the T factory, since
qubits are reused by different rounds."}, {"path": "physicalCountsFormatted/tfactoryRuntimePerRound",
"label": "Runtime per round", "description": "The runtime of each distillation
round", "explanation": "The runtime of the T factory is the sum of the runtimes
in all rounds."}, {"path": "physicalCountsFormatted/tstateLogicalErrorRate",
"label": "Logical T state error rate", "description": "Logical T state error
rate", "explanation": "This is the logical T state error rate achieved by
the T factory which is equal or smaller than the required error rate 1.67e-4."}]},
{"title": "Pre-layout logical resources", "alwaysVisible": false, "entries":
[{"path": "physicalCountsFormatted/logicalCountsNumQubits", "label": "Logical
qubits (pre-layout)", "description": "Number of logical qubits in the input
quantum program", "explanation": "We determine 9 algorithmic logical qubits
from this number by assuming to align them in a 2D grid. Auxiliary qubits
are added to allow for sufficient space to execute multi-qubit Pauli measurements
on all or a subset of the logical qubits."}, {"path": "physicalCountsFormatted/logicalCountsTCount",
"label": "T gates", "description": "Number of T gates in the input quantum
program", "explanation": "This includes all T gates and adjoint T gates, but
not T gates used to implement rotation gates with arbitrary angle, CCZ gates,
or CCiX gates."}, {"path": "physicalCountsFormatted/logicalCountsRotationCount",
"label": "Rotation gates", "description": "Number of rotation gates in the
input quantum program", "explanation": "This is the number of all rotation
gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not
accounted for in this number."}, {"path": "physicalCountsFormatted/logicalCountsRotationDepth",
"label": "Rotation depth", "description": "Depth of rotation gates in the
input quantum program", "explanation": "This is the number of all non-Clifford
layers that include at least one single-qubit rotation gate with an arbitrary
angle."}, {"path": "physicalCountsFormatted/logicalCountsCczCount", "label":
"CCZ gates", "description": "Number of CCZ-gates in the input quantum program",
"explanation": "This is the number of CCZ gates."}, {"path": "physicalCountsFormatted/logicalCountsCcixCount",
"label": "CCiX gates", "description": "Number of CCiX-gates in the input quantum
program", "explanation": "This is the number of CCiX gates, which applies
$-iX$ controlled on two control qubits [[1212.5069](https://arxiv.org/abs/1212.5069)]."},
{"path": "physicalCountsFormatted/logicalCountsMeasurementCount", "label":
"Measurement operations", "description": "Number of single qubit measurements
in the input quantum program", "explanation": "This is the number of single
qubit measurements in Pauli basis that are used in the input program. Note
that all measurements are counted, however, the measurement result is is determined
randomly (with a fixed seed) to be 0 or 1 with a probability of 50%."}]},
{"title": "Assumed error budget", "alwaysVisible": false, "entries": [{"path":
"physicalCountsFormatted/errorBudget", "label": "Total error budget", "description":
"Total error budget for the algorithm", "explanation": "The total error budget
sets the overall allowed error for the algorithm, i.e., the number of times
it is allowed to fail. Its value must be between 0 and 1 and the default
value is 0.001, which corresponds to 0.1%, and means that the algorithm is
allowed to fail once in 1000 executions. This parameter is highly application
specific. For example, if one is running Shor''s algorithm for factoring integers,
a large value for the error budget may be tolerated as one can check that
the output are indeed the prime factors of the input. On the other hand,
a much smaller error budget may be needed for an algorithm solving a problem
with a solution which cannot be efficiently verified. This budget $\\epsilon
= \\epsilon_{\\log} + \\epsilon_{\\rm dis} + \\epsilon_{\\rm syn}$ is uniformly
distributed and applies to errors $\\epsilon_{\\log}$ to implement logical
qubits, an error budget $\\epsilon_{\\rm dis}$ to produce T states through
distillation, and an error budget $\\epsilon_{\\rm syn}$ to synthesize rotation
gates with arbitrary angles. Note that for distillation and rotation synthesis,
the respective error budgets $\\epsilon_{\\rm dis}$ and $\\epsilon_{\\rm syn}$
are uniformly distributed among all T states and all rotation gates, respectively.
If there are no rotation gates in the input algorithm, the error budget is
uniformly distributed to logical errors and T state errors."}, {"path": "physicalCountsFormatted/errorBudgetLogical",
"label": "Logical error probability", "description": "Probability of at least
one logical error", "explanation": "This is one third of the total error budget
1.00e-3 if the input algorithm contains rotation with gates with arbitrary
angles, or one half of it, otherwise."}, {"path": "physicalCountsFormatted/errorBudgetTstates",
"label": "T distillation error probability", "description": "Probability of
at least one faulty T distillation", "explanation": "This is one third of
the total error budget 1.00e-3 if the input algorithm contains rotation with
gates with arbitrary angles, or one half of it, otherwise."}, {"path": "physicalCountsFormatted/errorBudgetRotations",
"label": "Rotation synthesis error probability", "description": "Probability
of at least one failed rotation synthesis", "explanation": "This is one third
of the total error budget 1.00e-3."}]}, {"title": "Physical qubit parameters",
"alwaysVisible": false, "entries": [{"path": "jobParams/qubitParams/name",
"label": "Qubit name", "description": "Some descriptive name for the qubit
model", "explanation": "You can load pre-defined qubit parameters by using
the names `qubit_gate_ns_e3`, `qubit_gate_ns_e4`, `qubit_gate_us_e3`, `qubit_gate_us_e4`,
`qubit_maj_ns_e4`, or `qubit_maj_ns_e6`. The names of these pre-defined qubit
parameters indicate the instruction set (gate-based or Majorana), the operation
speed (ns or \u00b5s regime), as well as the fidelity (e.g., e3 for $10^{-3}$
gate error rates)."}, {"path": "jobParams/qubitParams/instructionSet", "label":
"Instruction set", "description": "Underlying qubit technology (gate-based
or Majorana)", "explanation": "When modeling the physical qubit abstractions,
we distinguish between two different physical instruction sets that are used
to operate the qubits. The physical instruction set can be either *gate-based*
or *Majorana*. A gate-based instruction set provides single-qubit measurement,
single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction
set provides a physical T gate, single-qubit measurement and two-qubit joint
measurement operations."}, {"path": "jobParams/qubitParams/oneQubitMeasurementTime",
"label": "Single-qubit measurement time", "description": "Operation time for
single-qubit measurement (t_meas) in ns", "explanation": "This is the operation
time in nanoseconds to perform a single-qubit measurement in the Pauli basis."},
{"path": "jobParams/qubitParams/oneQubitGateTime", "label": "Single-qubit
gate time", "description": "Operation time for single-qubit gate (t_gate)
in ns", "explanation": "This is the operation time in nanoseconds to perform
a single-qubit Clifford operation, e.g., Hadamard or Phase gates."}, {"path":
"jobParams/qubitParams/twoQubitGateTime", "label": "Two-qubit gate time",
"description": "Operation time for two-qubit gate in ns", "explanation": "This
is the operation time in nanoseconds to perform a two-qubit Clifford operation,
e.g., a CNOT or CZ gate."}, {"path": "jobParams/qubitParams/tGateTime", "label":
"T gate time", "description": "Operation time for a T gate", "explanation":
"This is the operation time in nanoseconds to execute a T gate."}, {"path":
"jobParams/qubitParams/oneQubitMeasurementErrorRate", "label": "Single-qubit
measurement error rate", "description": "Error rate for single-qubit measurement",
"explanation": "This is the probability in which a single-qubit measurement
in the Pauli basis may fail."}, {"path": "jobParams/qubitParams/oneQubitGateErrorRate",
"label": "Single-qubit error rate", "description": "Error rate for single-qubit
Clifford gate (p)", "explanation": "This is the probability in which a single-qubit
Clifford operation, e.g., Hadamard or Phase gates, may fail."}, {"path": "jobParams/qubitParams/twoQubitGateErrorRate",
"label": "Two-qubit error rate", "description": "Error rate for two-qubit
Clifford gate", "explanation": "This is the probability in which a two-qubit
Clifford operation, e.g., CNOT or CZ gates, may fail."}, {"path": "jobParams/qubitParams/tGateErrorRate",
"label": "T gate error rate", "description": "Error rate to prepare single-qubit
T state or apply a T gate (p_T)", "explanation": "This is the probability
in which executing a single T gate may fail."}]}, {"title": "Constraints",
"alwaysVisible": false, "entries": [{"path": "physicalCountsFormatted/logicalDepthFactor",
"label": "Logical depth factor", "description": "Factor, the initial number
of logical cycles is multiplied by", "explanation": "This is the factor takes
into account a potential overhead to the initial number of logical cycles."},
{"path": "physicalCountsFormatted/maxTFactories", "label": "Maximum number
of T factories", "description": "The maximum number of T factories can be
utilized during the algorithm''s runtime", "explanation": "This is the maximum
number of T factories used for producing the demanded T states, which can
be created and executed by the algorithm in parallel."}, {"path": "physicalCountsFormatted/maxDuration",
"label": "Maximum runtime duration", "description": "The maximum runtime duration
allowed for the algorithm runtime", "explanation": "This is the maximum time
allowed to the algorithm. If specified, the estimator targets to minimize
the number of physical qubits consumed by the algorithm for runtimes under
the maximum allowed."}, {"path": "physicalCountsFormatted/maxPhysicalQubits",
"label": "Maximum number of physical qubits", "description": "The maximum
number of physical qubits allowed for utilization to the algorith", "explanation":
"This is the maximum number of physical qubits available to the algorithm.
If specified, the estimator targets to minimize the runtime of the algorithm
with number of physical qubits consumed not exceeding this maximum."}]}],
"assumptions": ["_More details on the following lists of assumptions can be
found in the paper [Accessing requirements for scaling quantum computers and
their applications](https://aka.ms/AQ/RE/Paper)._", "**Uniform independent
physical noise.** We assume that the noise on physical qubits and physical
qubit operations is the standard circuit noise model. In particular we assume
error events at different space-time locations are independent and that error
rates are uniform across the system in time and space.", "**Efficient classical
computation.** We assume that classical overhead (compilation, control, feedback,
readout, decoding, etc.) does not dominate the overall cost of implementing
the full quantum algorithm.", "**Extraction circuits for planar quantum ISA.**
We assume that stabilizer extraction circuits with similar depth and error
correction performance to those for standard surface and Hastings-Haah code
patches can be constructed to implement all operations of the planar quantum
ISA (instruction set architecture).", "**Uniform independent logical noise.**
We assume that the error rate of a logical operation is approximately equal
to its space-time volume (the number of tiles multiplied by the number of
logical time steps) multiplied by the error rate of a logical qubit in a standard
one-tile patch in one logical time step.", "**Negligible Clifford costs for
synthesis.** We assume that the space overhead for synthesis and space and
time overhead for transport of magic states within magic state factories and
to synthesis qubits are all negligible.", "**Smooth magic state consumption
rate.** We assume that the rate of T state consumption throughout the compiled
algorithm is almost constant, or can be made almost constant without significantly
increasing the number of logical time steps for the algorithm."]}}'
headers:
accept-ranges:
- bytes
content-length:
- '28177'
content-range:
- bytes 0-27428/27429
content-type:
- application/json
x-ms-blob-content-md5:
- hBhtJXTNmmu86vMQn3tDCg==
x-ms-blob-type:
- BlockBlob
x-ms-creation-time:
- Wed, 01 May 2024 17:51:52 GMT
x-ms-lease-state:
- available
x-ms-lease-status:
- unlocked
x-ms-server-encrypted:
- 'true'
x-ms-version:
- '2023-11-03'
status:
code: 206
message: Partial Content
version: 1
|
azure-quantum-python/azure-quantum/tests/unit/recordings/test_qiskit_controlled_s_to_resource_estimator.yaml/0
|
{
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_qiskit_controlled_s_to_resource_estimator.yaml",
"repo_id": "azure-quantum-python",
"token_count": 39364
}
| 352 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '181'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- azsdk-python-identity/1.16.0 Python/3.9.19 (Windows-10-10.0.22631-SP0)
x-client-current-telemetry:
- 4|730,2|
x-client-os:
- win32
x-client-sku:
- MSAL.Python
x-client-ver:
- 1.28.0
method: POST
uri: https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token
response:
body:
string: '{"token_type": "Bearer", "expires_in": 1746122776, "ext_expires_in":
1746122776, "refresh_in": 31536000, "access_token": "PLACEHOLDER"}'
headers:
content-length:
- '135'
content-type:
- application/json; charset=utf-8
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- testapp azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/sessions?api-version=2022-09-12-preview&test-sequence-id=1
response:
body:
string: '{"value": [{"status": "TimedOut", "jobFailurePolicy": "Abort", "name":
"My Session", "id": "24646b90-9b84-11ee-a5c9-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2023-12-15T19:57:17.0052883Z",
"endExecutionTime": "2023-12-15T20:08:30.1965511Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-266ee0f1-9b84-11ee-9570-b07d64eb437f", "id": "266ee0f1-9b84-11ee-9570-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2023-12-15T19:57:19.0683648Z",
"endExecutionTime": "2023-12-15T19:57:35.7561871Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-93917c1d-9b84-11ee-89af-b07d64eb437f",
"id": "93917c1d-9b84-11ee-89af-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2023-12-15T20:00:22.6893717Z",
"endExecutionTime": "2023-12-15T20:04:47.6086846Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-35108dce-9b85-11ee-b424-b07d64eb437f",
"id": "35108dce-9b85-11ee-b424-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2023-12-15T20:04:55.1025954Z",
"endExecutionTime": "2023-12-15T20:04:55.3868933Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-3295f6ce-9b84-11ee-aa7c-b07d64eb437f", "id": "3295f6ce-9b84-11ee-aa7c-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2023-12-15T19:57:39.6433373Z", "endExecutionTime": "2023-12-15T19:59:06.2869897Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-3696afad-9b85-11ee-9485-b07d64eb437f", "id": "3696afad-9b85-11ee-9485-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-15T20:04:57.1967149Z", "endExecutionTime": "2023-12-15T20:04:57.4493032Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-8a0f8a7a-9b84-11ee-ae4f-b07d64eb437f", "id": "8a0f8a7a-9b84-11ee-ae4f-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2023-12-15T20:00:06.4483921Z",
"endExecutionTime": "2023-12-15T20:00:19.2475248Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6818e2a3-9b84-11ee-b130-b07d64eb437f",
"id": "6818e2a3-9b84-11ee-b130-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2023-12-15T19:59:11.0483038Z",
"endExecutionTime": "2023-12-15T19:59:56.5502706Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-37cd669f-9b85-11ee-bbe4-b07d64eb437f", "id": "37cd669f-9b85-11ee-bbe4-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-15T20:04:59.1258612Z", "endExecutionTime": "2023-12-15T20:04:59.3540603Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-762e23e0-a10d-11ee-a05e-b07d64eb437f", "id": "762e23e0-a10d-11ee-a05e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T21:02:50.3822398Z", "endExecutionTime": "2023-12-22T21:03:11.1711273Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "d2ac150c-a10c-11ee-8a75-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T20:58:15.342445Z", "endExecutionTime": "2023-12-22T21:08:30.2087733Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-e3171c62-a10d-11ee-b534-b07d64eb437f", "id": "e3171c62-a10d-11ee-b534-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T21:05:52.5258643Z", "endExecutionTime": "2023-12-22T21:05:52.7727701Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-e1bbc20e-a10d-11ee-b4ec-b07d64eb437f", "id": "e1bbc20e-a10d-11ee-b4ec-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T21:05:50.3874438Z", "endExecutionTime": "2023-12-22T21:05:50.6206182Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-df86d346-a10c-11ee-be97-b07d64eb437f", "id": "df86d346-a10c-11ee-be97-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2023-12-22T20:58:35.6361957Z", "endExecutionTime": "2023-12-22T21:02:44.3983336Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-d4d109ae-a10c-11ee-9052-b07d64eb437f", "id": "d4d109ae-a10c-11ee-9052-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2023-12-22T20:58:17.6216072Z",
"endExecutionTime": "2023-12-22T20:58:32.1813236Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-e45f8255-a10d-11ee-ae8c-b07d64eb437f",
"id": "e45f8255-a10d-11ee-ae8c-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2023-12-22T21:05:54.5183881Z",
"endExecutionTime": "2023-12-22T21:05:54.7573188Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-e0e98972-a122-11ee-a727-b07d64eb437f", "id": "e0e98972-a122-11ee-a727-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T23:36:08.4010406Z", "endExecutionTime": "2023-12-22T23:36:37.449767Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-0064597c-a123-11ee-8856-b07d64eb437f", "id": "0064597c-a123-11ee-8856-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2023-12-22T23:36:59.7030738Z", "endExecutionTime": "2023-12-22T23:37:40.2651447Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-f638982a-a122-11ee-a0a3-b07d64eb437f", "id": "f638982a-a122-11ee-a0a3-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2023-12-22T23:36:42.5097884Z",
"endExecutionTime": "2023-12-22T23:36:56.9961412Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-1be4fc26-a123-11ee-be9e-b07d64eb437f",
"id": "1be4fc26-a123-11ee-be9e-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2023-12-22T23:37:47.4090935Z",
"endExecutionTime": "2023-12-22T23:37:47.6421095Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "bacc3932-a122-11ee-8de0-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2023-12-22T23:35:04.5932581Z",
"endExecutionTime": "2023-12-22T23:46:30.1709335Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-1d3d9a6e-a123-11ee-8e6f-b07d64eb437f", "id": "1d3d9a6e-a123-11ee-8e6f-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2023-12-22T23:37:49.4435858Z", "endExecutionTime": "2023-12-22T23:37:49.6787734Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-9342dea7-a10d-11ee-9913-b07d64eb437f", "id": "9342dea7-a10d-11ee-9913-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2023-12-22T21:03:37.1931107Z", "endExecutionTime": "2023-12-22T21:05:43.7819194Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-87cde539-a10d-11ee-b3a6-b07d64eb437f", "id": "87cde539-a10d-11ee-b3a6-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2023-12-22T21:03:17.9286054Z",
"endExecutionTime": "2023-12-22T21:03:32.1736184Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c58fde13-a122-11ee-8455-b07d64eb437f",
"id": "c58fde13-a122-11ee-8455-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2023-12-22T23:35:20.9961077Z",
"endExecutionTime": "2023-12-22T23:36:03.7599777Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-bd2137ef-a122-11ee-a21e-b07d64eb437f",
"id": "bd2137ef-a122-11ee-a21e-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2023-12-22T23:35:06.6869093Z", "endExecutionTime":
"2023-12-22T23:35:18.2022304Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-1e706fb9-a123-11ee-9f5f-b07d64eb437f",
"id": "1e706fb9-a123-11ee-9f5f-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2023-12-22T23:37:51.40851Z",
"endExecutionTime": "2023-12-22T23:37:51.640765Z", "costEstimate": null, "itemType":
"Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort", "name": "session-319aed15-af2e-11ee-bfc3-b07d64eb437f",
"id": "319aed15-af2e-11ee-bfc3-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-01-09T20:32:23.2589272Z", "endExecutionTime":
"2024-01-09T20:35:32.2977969Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-a46ef941-af2e-11ee-bbe4-b07d64eb437f",
"id": "a46ef941-af2e-11ee-bbe4-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-01-09T20:35:35.929685Z",
"endExecutionTime": "2024-01-09T20:40:22.9461907Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "2f6925e9-af2e-11ee-b2a2-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-01-09T20:32:20.8342757Z",
"endExecutionTime": "2024-01-09T20:42:23.6287725Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-3798a237-af2f-11ee-a7b8-b07d64eb437f", "id": "3798a237-af2f-11ee-a7b8-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-01-09T20:39:42.7837237Z",
"endExecutionTime": "2024-01-09T20:39:53.9507708Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-1aecda24-af2f-11ee-8e18-b07d64eb437f",
"id": "1aecda24-af2f-11ee-8e18-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-01-09T20:38:56.5097256Z",
"endExecutionTime": "2024-01-09T20:39:37.512772Z", "costEstimate": null, "itemType":
"Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort", "name": "session-4169cf0c-af2f-11ee-b442-b07d64eb437f",
"id": "4169cf0c-af2f-11ee-b442-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-01-09T20:39:59.4285597Z",
"endExecutionTime": "2024-01-09T20:41:30.6509394Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-c73026d4-af2f-11ee-952c-b07d64eb437f", "id": "c73026d4-af2f-11ee-952c-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-01-09T20:43:45.3580366Z", "endExecutionTime": "2024-01-09T20:43:45.6052723Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2b69c27b-af31-11ee-a413-b07d64eb437f", "id": "2b69c27b-af31-11ee-a413-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-01-09T20:53:41.3729105Z",
"endExecutionTime": "2024-01-09T20:53:52.7568384Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c5c37586-af2f-11ee-aa4c-b07d64eb437f",
"id": "c5c37586-af2f-11ee-aa4c-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-01-09T20:43:43.1612086Z",
"endExecutionTime": "2024-01-09T20:43:43.4035591Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-c87fdef1-af2f-11ee-9d30-b07d64eb437f", "id": "c87fdef1-af2f-11ee-9d30-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-01-09T20:43:47.4726078Z", "endExecutionTime": "2024-01-09T20:43:47.7478958Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "276a86fd-c0b9-11ee-9fb0-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-01T04:19:57.5158864Z", "endExecutionTime": "2024-02-01T04:30:31.2309839Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2908892e-c0b9-11ee-ba50-f8e4e3ddcdd5", "id": "2908892e-c0b9-11ee-ba50-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-01T04:19:58.9630479Z",
"endExecutionTime": "2024-02-01T04:20:08.9474069Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-301eea44-c0b9-11ee-97d6-f8e4e3ddcdd5",
"id": "301eea44-c0b9-11ee-97d6-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-01T04:20:10.8484275Z",
"endExecutionTime": "2024-02-01T04:22:14.4975138Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-7af9c031-c0b9-11ee-9898-f8e4e3ddcdd5",
"id": "7af9c031-c0b9-11ee-9898-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-01T04:22:18.038501Z",
"endExecutionTime": "2024-02-01T04:22:35.5526122Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-886d81ed-c0b9-11ee-9083-f8e4e3ddcdd5", "id": "886d81ed-c0b9-11ee-9083-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-01T04:22:39.1991592Z",
"endExecutionTime": "2024-02-01T04:22:49.4841008Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-900b505d-c0b9-11ee-a553-f8e4e3ddcdd5",
"id": "900b505d-c0b9-11ee-a553-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-01T04:22:51.9542106Z",
"endExecutionTime": "2024-02-01T04:24:19.8726579Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c6f7bb31-c0b9-11ee-a834-f8e4e3ddcdd5",
"id": "c6f7bb31-c0b9-11ee-a834-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-01T04:24:25.5482197Z",
"endExecutionTime": "2024-02-01T04:24:25.6405514Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-c80a6fd6-c0b9-11ee-a218-f8e4e3ddcdd5", "id": "c80a6fd6-c0b9-11ee-a218-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-01T04:24:27.2719438Z", "endExecutionTime": "2024-02-01T04:24:27.3406155Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-c90e4b5d-c0b9-11ee-9392-f8e4e3ddcdd5", "id": "c90e4b5d-c0b9-11ee-9392-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-01T04:24:28.9445042Z", "endExecutionTime": "2024-02-01T04:24:29.0137766Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "5f0806b5-ccf7-11ee-b829-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:15:34.7501465Z", "endExecutionTime": "2024-02-16T18:27:06.6643025Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-6126201f-ccf7-11ee-b2c1-b07d64eb437f", "id": "6126201f-ccf7-11ee-b2c1-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-16T18:15:36.8993729Z",
"endExecutionTime": "2024-02-16T18:15:50.1759087Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6b378592-ccf7-11ee-a9f2-b07d64eb437f",
"id": "6b378592-ccf7-11ee-a9f2-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-16T18:15:54.0404939Z",
"endExecutionTime": "2024-02-17T05:18:28.7490695Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-243da8f5-ccf8-11ee-9973-b07d64eb437f",
"id": "243da8f5-ccf8-11ee-9973-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-16T18:21:06.3829516Z",
"endExecutionTime": "2024-02-16T18:21:31.8074375Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-39eb5cf3-ccf8-11ee-ab35-b07d64eb437f", "id": "39eb5cf3-ccf8-11ee-ab35-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:21:40.5927125Z", "endExecutionTime": "2024-02-16T18:22:56.6095072Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-676bbb96-ccf8-11ee-b2a3-b07d64eb437f", "id": "676bbb96-ccf8-11ee-b2a3-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:22:59.0667798Z", "endExecutionTime": "2024-02-16T18:23:15.4015787Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-6de5a65c-ccf8-11ee-bde0-b07d64eb437f", "id": "6de5a65c-ccf8-11ee-bde0-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-16T18:23:07.7939007Z",
"endExecutionTime": "2024-02-16T18:23:19.2737636Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-732a9286-ccf8-11ee-a7b3-b07d64eb437f",
"id": "732a9286-ccf8-11ee-a7b3-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-16T18:23:16.6262516Z",
"endExecutionTime": "2024-02-17T05:18:39.9166379Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-7744ccdf-ccf8-11ee-902d-b07d64eb437f",
"id": "7744ccdf-ccf8-11ee-902d-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-16T18:23:25.4095718Z",
"endExecutionTime": "2024-02-16T18:23:40.4219803Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-8340ff2a-ccf8-11ee-a206-b07d64eb437f", "id": "8340ff2a-ccf8-11ee-a206-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-16T18:23:43.785635Z", "endExecutionTime": "2024-02-17T05:18:45.1595943Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-40af4a15-ccf9-11ee-81ff-b07d64eb437f", "id": "40af4a15-ccf9-11ee-81ff-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:29:03.5396206Z", "endExecutionTime": "2024-02-16T18:29:03.7704396Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-423ac27e-ccf9-11ee-a54e-b07d64eb437f", "id": "423ac27e-ccf9-11ee-a54e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:29:05.8727254Z", "endExecutionTime": "2024-02-16T18:29:06.1015896Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-43a249c6-ccf9-11ee-ac3b-b07d64eb437f", "id": "43a249c6-ccf9-11ee-ac3b-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-16T18:29:08.2791655Z", "endExecutionTime": "2024-02-16T18:29:08.5108847Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-c5f9c20e-d018-11ee-b7fd-b07d64eb437f", "id": "c5f9c20e-d018-11ee-b7fd-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-20T17:52:11.945877Z", "endExecutionTime": "2024-02-20T21:13:15.6524399Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "f791b6b1-d137-11ee-a7bf-f8e4e3ddcdd5", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-02-22T04:08:02.5179908Z",
"endExecutionTime": "2024-02-22T04:19:52.0854812Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-f930936b-d137-11ee-b6c8-f8e4e3ddcdd5", "id": "f930936b-d137-11ee-b6c8-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-22T04:08:03.921557Z",
"endExecutionTime": "2024-02-22T04:08:13.4789927Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-ffcf2776-d137-11ee-9ac8-f8e4e3ddcdd5",
"id": "ffcf2776-d137-11ee-9ac8-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-22T04:08:15.0306525Z",
"endExecutionTime": "2024-02-22T04:08:42.5012293Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-1139c047-d138-11ee-b8e8-f8e4e3ddcdd5",
"id": "1139c047-d138-11ee-b8e8-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-22T04:08:45.5881414Z",
"endExecutionTime": "2024-02-22T04:09:29.3905699Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-342f7708-d138-11ee-a231-f8e4e3ddcdd5", "id": "342f7708-d138-11ee-a231-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T04:09:42.9058562Z", "endExecutionTime": "2024-02-22T04:10:23.4705084Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-4c70df85-d138-11ee-a65c-f8e4e3ddcdd5", "id": "4c70df85-d138-11ee-a65c-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T04:10:25.0378852Z", "endExecutionTime": "2024-02-22T04:11:02.1226137Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-5062096b-d138-11ee-abda-f8e4e3ddcdd5", "id": "5062096b-d138-11ee-abda-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-22T04:10:30.2118952Z",
"endExecutionTime": "2024-02-22T04:10:40.3480426Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-535e315a-d138-11ee-a538-f8e4e3ddcdd5",
"id": "535e315a-d138-11ee-a538-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-22T04:10:35.4087969Z",
"endExecutionTime": "2024-02-22T04:10:56.4710463Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-55ae7669-d138-11ee-8032-f8e4e3ddcdd5",
"id": "55ae7669-d138-11ee-8032-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-22T04:10:40.8354358Z",
"endExecutionTime": "2024-02-22T04:11:00.9790638Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-66e778ef-d138-11ee-8dad-f8e4e3ddcdd5", "id": "66e778ef-d138-11ee-8dad-f8e4e3ddcdd5",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-22T04:11:07.9959223Z", "endExecutionTime": "2024-02-22T04:11:45.8344633Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-813dc7c3-d138-11ee-83c6-f8e4e3ddcdd5", "id": "813dc7c3-d138-11ee-83c6-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T04:11:53.5991852Z", "endExecutionTime": "2024-02-22T04:11:53.6623903Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-822c8e57-d138-11ee-94fe-f8e4e3ddcdd5", "id": "822c8e57-d138-11ee-94fe-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T04:11:54.9595856Z", "endExecutionTime": "2024-02-22T04:11:55.0189174Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-82fad439-d138-11ee-9c45-f8e4e3ddcdd5", "id": "82fad439-d138-11ee-9c45-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T04:11:56.3085139Z", "endExecutionTime": "2024-02-22T04:11:56.3640894Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "631d6d52-d141-11ee-aa95-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:15:28.2808831Z", "endExecutionTime": "2024-02-22T05:25:52.0883361Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-64a1ea86-d141-11ee-b699-f8e4e3ddcdd5", "id": "64a1ea86-d141-11ee-b699-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-22T05:15:29.609787Z",
"endExecutionTime": "2024-02-22T05:15:39.2810332Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6b2ebd22-d141-11ee-87f7-f8e4e3ddcdd5",
"id": "6b2ebd22-d141-11ee-87f7-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-22T05:15:40.6035795Z",
"endExecutionTime": "2024-02-22T05:16:08.2820378Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-7c9849a9-d141-11ee-a8aa-f8e4e3ddcdd5",
"id": "7c9849a9-d141-11ee-a8aa-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-22T05:16:11.2157746Z",
"endExecutionTime": "2024-02-22T05:16:20.0823031Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-848cb526-d141-11ee-add4-f8e4e3ddcdd5", "id": "848cb526-d141-11ee-add4-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:16:23.1705105Z", "endExecutionTime": "2024-02-22T05:17:20.5303714Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-a6eff9e8-d141-11ee-bb8c-f8e4e3ddcdd5", "id": "a6eff9e8-d141-11ee-bb8c-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:17:22.5034146Z", "endExecutionTime": "2024-02-22T05:17:36.1697585Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ab7aa814-d141-11ee-884e-f8e4e3ddcdd5", "id": "ab7aa814-d141-11ee-884e-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-22T05:17:28.4735928Z",
"endExecutionTime": "2024-02-22T05:17:37.5433309Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-aead8c4c-d141-11ee-9698-f8e4e3ddcdd5",
"id": "aead8c4c-d141-11ee-9698-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-22T05:17:34.0116947Z",
"endExecutionTime": "2024-02-22T05:17:55.5929303Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-b121b281-d141-11ee-8d75-f8e4e3ddcdd5",
"id": "b121b281-d141-11ee-8d75-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-22T05:17:39.3735702Z",
"endExecutionTime": "2024-02-22T05:17:54.4239719Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-bd272848-d141-11ee-81e8-f8e4e3ddcdd5", "id": "bd272848-d141-11ee-81e8-f8e4e3ddcdd5",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-22T05:17:58.6038288Z", "endExecutionTime": "2024-02-22T05:18:27.7225582Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-d24deea4-d141-11ee-a48b-f8e4e3ddcdd5", "id": "d24deea4-d141-11ee-a48b-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:18:35.1008242Z", "endExecutionTime": "2024-02-22T05:18:35.1636751Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-d3468224-d141-11ee-b787-f8e4e3ddcdd5", "id": "d3468224-d141-11ee-b787-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:18:36.5308335Z", "endExecutionTime": "2024-02-22T05:18:36.5861271Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-d41f61b7-d141-11ee-8405-f8e4e3ddcdd5", "id": "d41f61b7-d141-11ee-8405-f8e4e3ddcdd5",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-22T05:18:38.0479071Z", "endExecutionTime": "2024-02-22T05:18:38.1554799Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-3bf1b29b-d26a-11ee-a3e0-b07d64eb437f", "id": "3bf1b29b-d26a-11ee-a3e0-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T16:40:21.9090478Z", "endExecutionTime": "2024-02-23T16:41:50.6760074Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "59e22bcc-d26b-11ee-99fb-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-02-23T16:48:23.5619662Z",
"endExecutionTime": "2024-02-23T17:00:12.2016339Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-60023651-d26b-11ee-b618-b07d64eb437f", "id": "60023651-d26b-11ee-b618-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T16:48:31.6244108Z",
"endExecutionTime": "2024-02-23T16:48:45.1866796Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-6ac22928-d26b-11ee-b86e-b07d64eb437f",
"id": "6ac22928-d26b-11ee-b86e-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T16:48:51.7110104Z",
"endExecutionTime": "2024-02-23T16:49:26.7326457Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-877b94e2-d26b-11ee-bcdc-b07d64eb437f", "id": "877b94e2-d26b-11ee-bcdc-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T16:49:37.8825205Z", "endExecutionTime": "2024-02-23T16:50:50.8992811Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b34021da-d26b-11ee-a594-b07d64eb437f", "id": "b34021da-d26b-11ee-a594-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T16:50:53.0570495Z", "endExecutionTime": "2024-02-23T16:51:23.4034101Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b9d268da-d26b-11ee-8e4b-b07d64eb437f", "id": "b9d268da-d26b-11ee-8e4b-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T16:51:02.325107Z",
"endExecutionTime": "2024-02-23T16:51:12.1512395Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-beae38d1-d26b-11ee-83d8-b07d64eb437f",
"id": "beae38d1-d26b-11ee-83d8-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T16:51:10.4684645Z",
"endExecutionTime": "2024-02-23T16:53:29.665172Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c27a14e1-d26b-11ee-8e36-b07d64eb437f",
"id": "c27a14e1-d26b-11ee-8e36-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T16:51:18.2807379Z",
"endExecutionTime": "2024-02-23T16:51:35.2695373Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-cf0ad2a5-d26b-11ee-92d6-b07d64eb437f", "id": "cf0ad2a5-d26b-11ee-92d6-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T16:51:38.1047277Z", "endExecutionTime": "2024-02-23T16:53:48.1283298Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-2141eaed-d26c-11ee-9894-b07d64eb437f", "id": "2141eaed-d26c-11ee-9894-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T16:53:57.5728399Z", "endExecutionTime": "2024-02-23T16:53:57.8370708Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-229d475b-d26c-11ee-865b-b07d64eb437f", "id": "229d475b-d26c-11ee-865b-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T16:53:59.6519415Z", "endExecutionTime": "2024-02-23T16:53:59.8834739Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-23d61338-d26c-11ee-a195-b07d64eb437f", "id": "23d61338-d26c-11ee-a195-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T16:54:01.6940023Z", "endExecutionTime": "2024-02-23T16:54:01.9310081Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-fa51d769-d26c-11ee-80ea-b07d64eb437f", "id": "fa51d769-d26c-11ee-80ea-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T17:00:00.2652683Z",
"endExecutionTime": "2024-02-23T17:00:22.5688162Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-2928587b-d26d-11ee-b4b8-b07d64eb437f",
"id": "2928587b-d26d-11ee-b4b8-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-23T17:01:18.5989406Z", "endExecutionTime":
"2024-02-23T17:01:31.0415958Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-065d8d42-d26e-11ee-863d-b07d64eb437f",
"id": "065d8d42-d26e-11ee-863d-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-23T17:07:29.9511618Z", "endExecutionTime":
"2024-02-23T17:07:40.9632675Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "My Session", "id": "1cc46ac4-d26e-11ee-82dd-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:08:09.0708852Z", "endExecutionTime": "2024-02-23T17:18:12.1919564Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2191a227-d26e-11ee-8ab4-b07d64eb437f", "id": "2191a227-d26e-11ee-8ab4-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T17:08:15.3655421Z",
"endExecutionTime": "2024-02-23T17:08:41.2284688Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-33134059-d26e-11ee-a650-b07d64eb437f",
"id": "33134059-d26e-11ee-a650-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T17:08:44.9060912Z",
"endExecutionTime": "2024-02-23T17:10:51.8526394Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-80a75f74-d26e-11ee-bfca-b07d64eb437f",
"id": "80a75f74-d26e-11ee-bfca-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T17:10:56.534614Z",
"endExecutionTime": "2024-02-23T17:11:10.7131323Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-8dbec92a-d26e-11ee-93ac-b07d64eb437f", "id": "8dbec92a-d26e-11ee-93ac-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:11:16.8558811Z", "endExecutionTime": "2024-02-23T17:12:21.2216036Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b4567cfc-d26e-11ee-bbca-b07d64eb437f", "id": "b4567cfc-d26e-11ee-bbca-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:12:23.8426113Z", "endExecutionTime": "2024-02-23T17:12:46.8484546Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-c8045dd3-d26e-11ee-9223-b07d64eb437f", "id": "c8045dd3-d26e-11ee-9223-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T17:12:54.6290058Z",
"endExecutionTime": "2024-02-23T17:13:05.536714Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-d00f0317-d26e-11ee-9b96-b07d64eb437f",
"id": "d00f0317-d26e-11ee-9b96-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T17:13:08.2852125Z",
"endExecutionTime": "2024-02-23T17:15:10.9387434Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-dbdd21bc-d26e-11ee-af7e-b07d64eb437f",
"id": "dbdd21bc-d26e-11ee-af7e-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T17:13:29.9365138Z",
"endExecutionTime": "2024-02-23T17:13:45.6233889Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "session-e95e4624-d26e-11ee-92bf-b07d64eb437f", "id": "e95e4624-d26e-11ee-92bf-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T17:13:50.7511317Z", "endExecutionTime": "2024-02-23T17:26:12.1993201Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "286135ae-d26f-11ee-9ba3-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-02-23T17:15:38.1462829Z",
"endExecutionTime": "2024-02-23T17:26:12.2459207Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-2d41f22e-d26f-11ee-949e-b07d64eb437f", "id": "2d41f22e-d26f-11ee-949e-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T17:15:44.4685001Z",
"endExecutionTime": "2024-02-23T17:16:05.6357912Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-3bd68da9-d26f-11ee-be01-b07d64eb437f",
"id": "3bd68da9-d26f-11ee-be01-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T17:16:09.1348774Z",
"endExecutionTime": "2024-02-23T17:16:41.2432874Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-512121a2-d26f-11ee-8913-b07d64eb437f",
"id": "512121a2-d26f-11ee-8913-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T17:16:46.4332045Z",
"endExecutionTime": "2024-02-23T17:17:22.4710086Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-6df27781-d26f-11ee-98de-b07d64eb437f", "id": "6df27781-d26f-11ee-98de-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:17:33.0572423Z", "endExecutionTime": "2024-02-23T17:18:09.8529829Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-84200fe7-d26f-11ee-805a-b07d64eb437f", "id": "84200fe7-d26f-11ee-805a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:18:11.9638826Z", "endExecutionTime": "2024-02-23T17:18:33.990761Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-9409a2e4-d26f-11ee-9e46-b07d64eb437f", "id": "9409a2e4-d26f-11ee-9e46-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T17:18:37.0827947Z",
"endExecutionTime": "2024-02-23T17:18:46.5730396Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-9b2ea166-d26f-11ee-8cd8-b07d64eb437f",
"id": "9b2ea166-d26f-11ee-8cd8-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T17:18:49.076954Z",
"endExecutionTime": "2024-02-23T17:22:35.7014362Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-a6ef185a-d26f-11ee-92b7-b07d64eb437f",
"id": "a6ef185a-d26f-11ee-92b7-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T17:19:10.8056876Z",
"endExecutionTime": "2024-02-23T17:19:44.0179158Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-bef37903-d26f-11ee-bc2f-b07d64eb437f", "id": "bef37903-d26f-11ee-bc2f-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T17:19:48.917798Z", "endExecutionTime": "2024-02-23T17:22:58.7258286Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-37465ac4-d270-11ee-bf69-b07d64eb437f", "id": "37465ac4-d270-11ee-bf69-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:23:13.1483091Z", "endExecutionTime": "2024-02-23T17:23:13.3996367Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-38fe2982-d270-11ee-b38b-b07d64eb437f", "id": "38fe2982-d270-11ee-b38b-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:23:15.3231657Z", "endExecutionTime": "2024-02-23T17:23:15.5987125Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-3a4f3a3d-d270-11ee-9771-b07d64eb437f", "id": "3a4f3a3d-d270-11ee-9771-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T17:23:17.685984Z", "endExecutionTime": "2024-02-23T17:23:18.0114972Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-6c96e0aa-d270-11ee-bf5a-b07d64eb437f", "id": "6c96e0aa-d270-11ee-bf5a-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T17:24:40.2281257Z", "endExecutionTime": "2024-02-23T17:33:37.538535Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "849479af-d27e-11ee-a803-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-02-23T19:05:34.8217548Z",
"endExecutionTime": "2024-02-23T19:16:12.204761Z", "costEstimate": null, "itemType":
"Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort", "name": "session-86a7d3c5-d27e-11ee-987f-b07d64eb437f",
"id": "86a7d3c5-d27e-11ee-987f-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-23T19:05:36.9363666Z", "endExecutionTime":
"2024-02-23T19:05:52.8732459Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-91e85423-d27e-11ee-9bac-b07d64eb437f",
"id": "91e85423-d27e-11ee-9bac-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-23T19:05:56.0020462Z",
"endExecutionTime": "2024-02-23T19:10:04.1748095Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-27b51a97-d27f-11ee-950f-b07d64eb437f",
"id": "27b51a97-d27f-11ee-950f-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T19:10:08.7950305Z",
"endExecutionTime": "2024-02-23T19:10:33.4528421Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-3d1972fa-d27f-11ee-b720-b07d64eb437f", "id": "3d1972fa-d27f-11ee-b720-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T19:10:43.0284879Z", "endExecutionTime": "2024-02-23T19:11:57.672016Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-69c652c9-d27f-11ee-aa19-b07d64eb437f", "id": "69c652c9-d27f-11ee-aa19-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T19:11:59.7093408Z", "endExecutionTime": "2024-02-23T19:12:39.8776782Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-883b1aeb-d27f-11ee-88f8-b07d64eb437f", "id": "883b1aeb-d27f-11ee-88f8-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-23T19:12:49.0767711Z",
"endExecutionTime": "2024-02-23T19:12:59.8010735Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-9620d026-d27f-11ee-83c1-b07d64eb437f",
"id": "9620d026-d27f-11ee-83c1-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-23T19:13:13.9860031Z",
"endExecutionTime": "2024-02-23T19:13:33.5653854Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-a564ad8e-d27f-11ee-a404-b07d64eb437f", "id": "a564ad8e-d27f-11ee-a404-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T19:13:38.1958214Z", "endExecutionTime": "2024-02-23T19:25:17.6143079Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-617bddbb-d280-11ee-918f-b07d64eb437f", "id": "617bddbb-d280-11ee-918f-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T19:18:55.2633107Z", "endExecutionTime": "2024-02-23T19:18:55.4953927Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-62c93f10-d280-11ee-9484-b07d64eb437f", "id": "62c93f10-d280-11ee-9484-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T19:18:57.0527124Z", "endExecutionTime": "2024-02-23T19:18:57.2732838Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-63d59b62-d280-11ee-acb1-b07d64eb437f", "id": "63d59b62-d280-11ee-acb1-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-23T19:18:58.9230905Z", "endExecutionTime": "2024-02-23T19:18:59.1426404Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-1b56c8f5-d281-11ee-b3eb-b07d64eb437f", "id": "1b56c8f5-d281-11ee-b3eb-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T19:24:05.6335881Z", "endExecutionTime": "2024-02-23T19:25:36.7527351Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-a9174d0a-d282-11ee-9254-b07d64eb437f", "id": "a9174d0a-d282-11ee-9254-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-23T19:35:12.9464011Z", "endExecutionTime": "2024-02-23T19:52:41.8960347Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-b80261ae-d431-11ee-8742-f8e4e3ddcdd5", "id": "b80261ae-d431-11ee-8742-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-25T23:00:50.8124232Z",
"endExecutionTime": "2024-02-25T23:01:07.5248889Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"TimedOut", "jobFailurePolicy": "Abort", "name": "session-174c0588-d432-11ee-aee4-f8e4e3ddcdd5",
"id": "174c0588-d432-11ee-aee4-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-25T23:03:30.216431Z",
"endExecutionTime": "2024-02-26T21:08:12.2216981Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-2c96dafe-d435-11ee-b00f-f8e4e3ddcdd5",
"id": "2c96dafe-d435-11ee-b00f-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-25T23:25:36.6738991Z",
"endExecutionTime": "2024-02-25T23:25:54.5320205Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "2fd57ccf-d581-11ee-b5d9-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-02-27T15:02:33.0154337Z",
"endExecutionTime": "2024-02-27T15:13:21.1096253Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-40f6e630-d581-11ee-b14b-b07d64eb437f", "id": "40f6e630-d581-11ee-b14b-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T15:02:41.7623595Z",
"endExecutionTime": "2024-02-27T15:02:56.5956959Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-4b62a6de-d581-11ee-96da-b07d64eb437f",
"id": "4b62a6de-d581-11ee-96da-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T15:02:59.3865967Z",
"endExecutionTime": "2024-02-27T16:22:22.5138778Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-0532cf10-d582-11ee-b210-b07d64eb437f",
"id": "0532cf10-d582-11ee-b210-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T15:08:12.5014903Z",
"endExecutionTime": "2024-02-27T15:08:44.1822699Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-21e0d99f-d582-11ee-a663-b07d64eb437f", "id": "21e0d99f-d582-11ee-a663-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T15:08:59.0428838Z", "endExecutionTime": "2024-02-27T15:09:53.2299619Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-42652e54-d582-11ee-9b97-b07d64eb437f", "id": "42652e54-d582-11ee-9b97-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T15:09:55.3635206Z", "endExecutionTime": "2024-02-27T15:10:11.2321231Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-4badae8a-d582-11ee-9a79-b07d64eb437f", "id": "4badae8a-d582-11ee-9a79-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T15:10:09.3372418Z",
"endExecutionTime": "2024-02-27T15:10:20.3171727Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"TimedOut", "jobFailurePolicy": "Abort", "name": "session-53a1fb1e-d582-11ee-b314-b07d64eb437f",
"id": "53a1fb1e-d582-11ee-b314-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T15:10:22.7350421Z",
"endExecutionTime": "2024-02-27T16:33:21.0972192Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"TimedOut", "jobFailurePolicy": "Abort", "name": "session-b29accfd-d588-11ee-83bd-b07d64eb437f",
"id": "b29accfd-d588-11ee-83bd-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T15:55:59.07764Z", "endExecutionTime":
"2024-02-27T16:07:21.1065878Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-4f2f3219-d58a-11ee-a803-b07d64eb437f",
"id": "4f2f3219-d58a-11ee-a803-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:07:31.3009228Z", "endExecutionTime":
"2024-02-27T16:07:47.8349593Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-2534cddd-d58b-11ee-8cd8-b07d64eb437f",
"id": "2534cddd-d58b-11ee-8cd8-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:13:30.4713446Z", "endExecutionTime":
"2024-02-27T16:25:21.1189929Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-4e865d4c-d58b-11ee-a97d-b07d64eb437f",
"id": "4e865d4c-d58b-11ee-a97d-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:14:39.7261596Z", "endExecutionTime":
"2024-02-27T16:25:21.1337943Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-8f1455c5-d58b-11ee-9378-b07d64eb437f",
"id": "8f1455c5-d58b-11ee-9378-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:16:27.9218818Z", "endExecutionTime":
"2024-02-27T16:27:21.1014735Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-bfbe0df4-d58b-11ee-993c-b07d64eb437f",
"id": "bfbe0df4-d58b-11ee-993c-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:17:49.5741083Z", "endExecutionTime":
"2024-02-27T16:29:21.1037609Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-e9af32a9-d58b-11ee-b349-b07d64eb437f",
"id": "e9af32a9-d58b-11ee-b349-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:19:00.2119009Z", "endExecutionTime":
"2024-02-27T16:29:21.1182461Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "session-0ba0ba1c-d58c-11ee-bc66-b07d64eb437f",
"id": "0ba0ba1c-d58c-11ee-bc66-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:19:56.7109813Z", "endExecutionTime":
"2024-02-27T16:31:21.1083122Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-29b99b0a-d58c-11ee-814a-b07d64eb437f",
"id": "29b99b0a-d58c-11ee-814a-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:20:47.1991397Z", "endExecutionTime":
"2024-02-27T16:21:45.2615627Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-928653fb-d58c-11ee-8938-b07d64eb437f",
"id": "928653fb-d58c-11ee-8938-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-02-27T16:23:43.0215077Z", "endExecutionTime":
"2024-02-27T16:24:01.9329679Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "TimedOut",
"jobFailurePolicy": "Abort", "name": "My Session", "id": "b718495d-d58c-11ee-9516-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T16:24:46.1650618Z", "endExecutionTime": "2024-02-27T16:35:21.1058203Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-bb82395e-d58c-11ee-899d-b07d64eb437f", "id": "bb82395e-d58c-11ee-899d-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T16:24:51.7807955Z",
"endExecutionTime": "2024-02-27T16:25:05.8104129Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-c5b4ef71-d58c-11ee-89f7-b07d64eb437f",
"id": "c5b4ef71-d58c-11ee-89f7-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T16:25:08.8915842Z",
"endExecutionTime": "2024-02-27T16:30:42.6976121Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-93ac08b1-d58d-11ee-bf06-b07d64eb437f",
"id": "93ac08b1-d58d-11ee-bf06-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T16:30:56.693388Z",
"endExecutionTime": "2024-02-27T16:31:09.351112Z", "costEstimate": null, "itemType":
"Session"}, {"status": "Failed", "jobFailurePolicy": "Continue", "name": "session-a1596a5b-d58d-11ee-b904-b07d64eb437f",
"id": "a1596a5b-d58d-11ee-b904-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T16:31:17.3927242Z",
"endExecutionTime": "2024-02-27T16:31:56.4312384Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-b8d3e709-d58d-11ee-858c-b07d64eb437f", "id": "b8d3e709-d58d-11ee-858c-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T16:31:58.3954494Z", "endExecutionTime": "2024-02-27T16:32:24.1499348Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f7330b8b-d58d-11ee-900d-b07d64eb437f", "id": "f7330b8b-d58d-11ee-900d-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T16:33:41.6180564Z",
"endExecutionTime": "2024-02-27T16:33:54.074195Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-03165c1a-d58e-11ee-b651-b07d64eb437f",
"id": "03165c1a-d58e-11ee-b651-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T16:34:01.5534466Z",
"endExecutionTime": "2024-02-27T16:39:36.4413843Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c1cdb5ff-d58e-11ee-9a51-b07d64eb437f",
"id": "c1cdb5ff-d58e-11ee-9a51-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T16:39:23.9776725Z",
"endExecutionTime": "2024-02-27T16:40:01.9604733Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-dea26a73-d58e-11ee-81f8-b07d64eb437f", "id": "dea26a73-d58e-11ee-81f8-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-27T16:40:09.7126359Z", "endExecutionTime": "2024-02-27T16:46:53.6229802Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-ab794369-d58f-11ee-8abd-b07d64eb437f", "id": "ab794369-d58f-11ee-8abd-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T16:45:55.492754Z", "endExecutionTime": "2024-02-27T16:45:55.7463036Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ad0d5e23-d58f-11ee-a065-b07d64eb437f", "id": "ad0d5e23-d58f-11ee-a065-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T16:45:57.6743108Z", "endExecutionTime": "2024-02-27T16:45:57.9100643Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ae5665c1-d58f-11ee-8db1-b07d64eb437f", "id": "ae5665c1-d58f-11ee-8db1-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T16:45:59.7883948Z", "endExecutionTime": "2024-02-27T16:46:00.033707Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "e25407e2-d5a7-11ee-b5e7-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:39:15.4263502Z", "endExecutionTime": "2024-02-27T19:49:21.1094321Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-e5263514-d5a7-11ee-9f1d-b07d64eb437f", "id": "e5263514-d5a7-11ee-9f1d-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T19:39:18.3054409Z",
"endExecutionTime": "2024-02-27T19:39:32.4018469Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-f03dd6c6-d5a7-11ee-a35a-b07d64eb437f",
"id": "f03dd6c6-d5a7-11ee-a35a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T19:39:36.9401845Z",
"endExecutionTime": "2024-02-27T19:39:48.0700332Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-f7822dec-d5a7-11ee-8d52-b07d64eb437f",
"id": "f7822dec-d5a7-11ee-8d52-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T19:39:51.0947263Z",
"endExecutionTime": "2024-02-27T19:40:07.5664851Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-05ee8271-d5a8-11ee-9d0e-b07d64eb437f", "id": "05ee8271-d5a8-11ee-9d0e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:40:13.1262476Z", "endExecutionTime": "2024-02-27T19:41:30.003632Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-33d54f28-d5a8-11ee-a674-b07d64eb437f", "id": "33d54f28-d5a8-11ee-a674-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:41:31.9128993Z", "endExecutionTime": "2024-02-27T19:41:53.3043908Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-442186da-d5a8-11ee-9b9f-b07d64eb437f", "id": "442186da-d5a8-11ee-9b9f-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T19:41:57.8182667Z",
"endExecutionTime": "2024-02-27T19:42:08.5662669Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-4d5f5e4f-d5a8-11ee-921a-b07d64eb437f",
"id": "4d5f5e4f-d5a8-11ee-921a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T19:42:13.3153391Z",
"endExecutionTime": "2024-02-27T19:42:24.2812442Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-55d5b3b6-d5a8-11ee-9daa-b07d64eb437f",
"id": "55d5b3b6-d5a8-11ee-9daa-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T19:42:28.9981508Z",
"endExecutionTime": "2024-02-27T19:42:44.6496941Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-62e5b70b-d5a8-11ee-9113-b07d64eb437f", "id": "62e5b70b-d5a8-11ee-9113-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-02-27T19:42:49.4623227Z", "endExecutionTime": "2024-02-27T19:43:03.9122624Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-6f87c0ae-d5a8-11ee-9e13-b07d64eb437f", "id": "6f87c0ae-d5a8-11ee-9e13-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:43:12.5399446Z", "endExecutionTime": "2024-02-27T19:43:12.7640147Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-710e5ea8-d5a8-11ee-9bba-b07d64eb437f", "id": "710e5ea8-d5a8-11ee-9bba-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:43:14.4085058Z", "endExecutionTime": "2024-02-27T19:43:14.6460677Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-72335461-d5a8-11ee-b9ff-b07d64eb437f", "id": "72335461-d5a8-11ee-b9ff-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-02-27T19:43:16.5472647Z", "endExecutionTime": "2024-02-27T19:43:16.9593204Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-485c3ce1-d5bd-11ee-9709-f8e4e3ddcdd5", "id": "485c3ce1-d5bd-11ee-9709-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-02-27T22:12:23.9608158Z",
"endExecutionTime": "2024-02-27T22:12:42.8826329Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6839d10c-d5bd-11ee-8809-f8e4e3ddcdd5",
"id": "6839d10c-d5bd-11ee-8809-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-02-27T22:13:17.1844327Z",
"endExecutionTime": "2024-02-27T22:32:48.8094137Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-4bceddca-d5be-11ee-90fb-f8e4e3ddcdd5",
"id": "4bceddca-d5be-11ee-90fb-f8e4e3ddcdd5", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-02-27T22:19:41.1812761Z",
"endExecutionTime": "2024-02-27T22:19:55.7240284Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "3b36e8b5-db1a-11ee-a547-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-03-05T18:00:22.9397659Z",
"endExecutionTime": "2024-03-05T18:10:55.4433959Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-3d72c674-db1a-11ee-9534-b07d64eb437f", "id": "3d72c674-db1a-11ee-9534-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-05T18:00:25.1801029Z",
"endExecutionTime": "2024-03-05T18:00:38.0707057Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-471ffa55-db1a-11ee-8822-b07d64eb437f",
"id": "471ffa55-db1a-11ee-8822-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-05T18:00:41.3799127Z",
"endExecutionTime": "2024-03-05T18:01:04.643018Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-557749fd-db1a-11ee-9502-b07d64eb437f",
"id": "557749fd-db1a-11ee-9502-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-05T18:01:06.9724846Z",
"endExecutionTime": "2024-03-05T18:01:24.3849811Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-66b94862-db1a-11ee-97f8-b07d64eb437f", "id": "66b94862-db1a-11ee-97f8-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-05T18:01:34.2434379Z", "endExecutionTime": "2024-03-05T18:02:29.666127Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-87f26e8c-db1a-11ee-992e-b07d64eb437f", "id": "87f26e8c-db1a-11ee-992e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-05T18:02:31.6288011Z", "endExecutionTime": "2024-03-05T18:02:55.2084431Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-98fada8d-db1a-11ee-bcbb-b07d64eb437f", "id": "98fada8d-db1a-11ee-bcbb-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-05T18:02:58.7760945Z",
"endExecutionTime": "2024-03-05T18:03:09.525377Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-a240b38f-db1a-11ee-b660-b07d64eb437f",
"id": "a240b38f-db1a-11ee-b660-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-05T18:03:14.2808853Z",
"endExecutionTime": "2024-03-05T18:03:38.1035208Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-b0eacf6d-db1a-11ee-acd1-b07d64eb437f",
"id": "b0eacf6d-db1a-11ee-acd1-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-05T18:03:40.4625642Z",
"endExecutionTime": "2024-03-05T18:04:25.5987311Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-cfa35cc1-db1a-11ee-a473-b07d64eb437f", "id": "cfa35cc1-db1a-11ee-a473-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-05T18:04:30.2596662Z", "endExecutionTime": "2024-03-05T18:04:54.0682313Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-e1ca15d2-db1a-11ee-ae51-b07d64eb437f", "id": "e1ca15d2-db1a-11ee-ae51-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-05T18:05:02.3062871Z", "endExecutionTime": "2024-03-05T18:05:02.536201Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-e3069e74-db1a-11ee-82f8-b07d64eb437f", "id": "e3069e74-db1a-11ee-82f8-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-05T18:05:04.229779Z", "endExecutionTime": "2024-03-05T18:05:04.4456178Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-e428ad73-db1a-11ee-bd13-b07d64eb437f", "id": "e428ad73-db1a-11ee-bd13-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-05T18:05:06.5862534Z", "endExecutionTime": "2024-03-05T18:05:06.8195854Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "c01d35fb-dd96-11ee-a0d8-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T21:56:45.5066014Z", "endExecutionTime": "2024-03-08T22:08:26.9692348Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-c25246a5-dd96-11ee-b545-b07d64eb437f", "id": "c25246a5-dd96-11ee-b545-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-08T21:56:47.7923332Z",
"endExecutionTime": "2024-03-08T21:57:01.6389785Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-cc6cda5a-dd96-11ee-af76-b07d64eb437f",
"id": "cc6cda5a-dd96-11ee-af76-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-08T21:57:04.7347417Z",
"endExecutionTime": "2024-03-08T21:57:49.6543076Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-e90d045d-dd96-11ee-91f1-b07d64eb437f",
"id": "e90d045d-dd96-11ee-91f1-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-08T21:57:54.3074664Z",
"endExecutionTime": "2024-03-08T21:58:05.3967484Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-f49d5ce8-dd96-11ee-814a-b07d64eb437f", "id": "f49d5ce8-dd96-11ee-814a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T21:58:11.9876713Z", "endExecutionTime": "2024-03-08T21:59:19.7291454Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-1d2a0487-dd97-11ee-a17f-b07d64eb437f", "id": "1d2a0487-dd97-11ee-a17f-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T21:59:21.655997Z", "endExecutionTime": "2024-03-08T21:59:39.2298612Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2a00b10f-dd97-11ee-8c80-b07d64eb437f", "id": "2a00b10f-dd97-11ee-8c80-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-08T21:59:41.7273885Z",
"endExecutionTime": "2024-03-08T21:59:52.4700661Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-332d60eb-dd97-11ee-8e0a-b07d64eb437f",
"id": "332d60eb-dd97-11ee-8e0a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-08T21:59:57.1415506Z",
"endExecutionTime": "2024-03-08T22:00:29.0232218Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-47f00b81-dd97-11ee-85a9-b07d64eb437f",
"id": "47f00b81-dd97-11ee-85a9-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-08T22:00:33.3507065Z",
"endExecutionTime": "2024-03-08T22:01:07.5869964Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-602e5149-dd97-11ee-975e-b07d64eb437f", "id": "602e5149-dd97-11ee-975e-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-08T22:01:12.4413682Z", "endExecutionTime": "2024-03-08T22:02:15.6957018Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-8b491c92-dd97-11ee-bf84-b07d64eb437f", "id": "8b491c92-dd97-11ee-bf84-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T22:02:26.5042928Z", "endExecutionTime": "2024-03-08T22:02:26.7373756Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-8c9cc6a0-dd97-11ee-9c57-b07d64eb437f", "id": "8c9cc6a0-dd97-11ee-9c57-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T22:02:28.9164909Z", "endExecutionTime": "2024-03-08T22:02:29.1425527Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-8e087d50-dd97-11ee-9220-b07d64eb437f", "id": "8e087d50-dd97-11ee-9220-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T22:02:30.8113492Z", "endExecutionTime": "2024-03-08T22:02:31.0328908Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "4bd91bcc-dda4-11ee-a74c-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:33:43.5193009Z", "endExecutionTime": "2024-03-08T23:44:26.9683902Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-4e3db05a-dda4-11ee-8cbd-b07d64eb437f", "id": "4e3db05a-dda4-11ee-8cbd-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-08T23:33:46.0553502Z",
"endExecutionTime": "2024-03-08T23:33:59.4653241Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-57b0e803-dda4-11ee-9afb-b07d64eb437f",
"id": "57b0e803-dda4-11ee-9afb-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-08T23:34:02.0460203Z",
"endExecutionTime": "2024-03-08T23:35:17.2525796Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-8b7248b8-dda4-11ee-91ff-b07d64eb437f",
"id": "8b7248b8-dda4-11ee-91ff-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-08T23:35:30.6394656Z",
"endExecutionTime": "2024-03-08T23:35:43.7038492Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-97fb3896-dda4-11ee-9408-b07d64eb437f", "id": "97fb3896-dda4-11ee-9408-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:35:49.7549249Z", "endExecutionTime": "2024-03-08T23:36:55.8727453Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-bf9ab86f-dda4-11ee-8e4e-b07d64eb437f", "id": "bf9ab86f-dda4-11ee-8e4e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:36:57.9131845Z", "endExecutionTime": "2024-03-08T23:37:14.5800881Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-cd68e672-dda4-11ee-b650-b07d64eb437f", "id": "cd68e672-dda4-11ee-b650-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-08T23:37:19.5601054Z",
"endExecutionTime": "2024-03-08T23:37:30.5841022Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-d7174f02-dda4-11ee-a968-b07d64eb437f",
"id": "d7174f02-dda4-11ee-a968-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-08T23:37:35.8463181Z",
"endExecutionTime": "2024-03-08T23:38:08.3694696Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-ec67164c-dda4-11ee-81d6-b07d64eb437f",
"id": "ec67164c-dda4-11ee-81d6-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-08T23:38:12.9927291Z",
"endExecutionTime": "2024-03-08T23:38:53.8673222Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-0a6916e2-dda5-11ee-a1af-b07d64eb437f", "id": "0a6916e2-dda5-11ee-a1af-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-08T23:39:01.7225485Z", "endExecutionTime": "2024-03-08T23:39:38.2545598Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-2857b921-dda5-11ee-9b3d-b07d64eb437f", "id": "2857b921-dda5-11ee-9b3d-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:39:53.6676196Z", "endExecutionTime": "2024-03-08T23:39:53.8986482Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-29a82d84-dda5-11ee-8e20-b07d64eb437f", "id": "29a82d84-dda5-11ee-8e20-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:39:55.6885949Z", "endExecutionTime": "2024-03-08T23:39:55.907378Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2adb3f8e-dda5-11ee-bc6a-b07d64eb437f", "id": "2adb3f8e-dda5-11ee-bc6a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-08T23:39:57.5958714Z", "endExecutionTime": "2024-03-08T23:39:57.8339125Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "c8d79e17-dfdd-11ee-9183-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:30:18.9539592Z", "endExecutionTime": "2024-03-11T19:40:26.9633794Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-cb12c284-dfdd-11ee-9cab-b07d64eb437f", "id": "cb12c284-dfdd-11ee-9cab-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-11T19:30:21.0336711Z",
"endExecutionTime": "2024-03-11T19:30:34.0326659Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-d4aa2f30-dfdd-11ee-97cc-b07d64eb437f",
"id": "d4aa2f30-dfdd-11ee-97cc-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-11T19:30:37.1336141Z",
"endExecutionTime": "2024-03-11T19:31:09.7742934Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-e9eaee8d-dfdd-11ee-adee-b07d64eb437f",
"id": "e9eaee8d-dfdd-11ee-adee-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-11T19:31:14.3895738Z",
"endExecutionTime": "2024-03-11T19:31:48.8378773Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-0836cba1-dfde-11ee-859c-b07d64eb437f", "id": "0836cba1-dfde-11ee-859c-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:32:03.6173202Z", "endExecutionTime": "2024-03-11T19:33:34.5352112Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-3e937979-dfde-11ee-ad66-b07d64eb437f", "id": "3e937979-dfde-11ee-ad66-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:33:36.414741Z", "endExecutionTime": "2024-03-11T19:33:57.9661369Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-4ddd0816-dfde-11ee-b0da-b07d64eb437f", "id": "4ddd0816-dfde-11ee-b0da-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-11T19:34:00.6479668Z",
"endExecutionTime": "2024-03-11T19:34:11.7062802Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-5751aba4-dfde-11ee-aa4c-b07d64eb437f",
"id": "5751aba4-dfde-11ee-aa4c-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-11T19:34:16.7675264Z",
"endExecutionTime": "2024-03-11T19:34:39.1618472Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6605c3ba-dfde-11ee-9228-b07d64eb437f",
"id": "6605c3ba-dfde-11ee-9228-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-11T19:34:42.9893944Z",
"endExecutionTime": "2024-03-11T19:34:56.6140926Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-70b006fb-dfde-11ee-9def-b07d64eb437f", "id": "70b006fb-dfde-11ee-9def-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-11T19:34:59.0714253Z", "endExecutionTime": "2024-03-11T19:35:32.4702063Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-89fe6110-dfde-11ee-8e28-b07d64eb437f", "id": "89fe6110-dfde-11ee-8e28-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:35:43.0360948Z", "endExecutionTime": "2024-03-11T19:35:43.2586031Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-8b43c2f0-dfde-11ee-a94e-b07d64eb437f", "id": "8b43c2f0-dfde-11ee-a94e-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:35:44.9914299Z", "endExecutionTime": "2024-03-11T19:35:45.2392476Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-8c738689-dfde-11ee-9052-b07d64eb437f", "id": "8c738689-dfde-11ee-9052-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-11T19:35:46.9482656Z", "endExecutionTime": "2024-03-11T19:35:47.1899579Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "d5e5a081-ec63-11ee-b10d-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T18:00:05.7735181Z", "endExecutionTime": "2024-03-27T18:11:37.7649437Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-d848d364-ec63-11ee-b452-b07d64eb437f", "id": "d848d364-ec63-11ee-b452-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-27T18:00:08.1840378Z",
"endExecutionTime": "2024-03-27T18:00:20.7260825Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-e164770d-ec63-11ee-ae7c-b07d64eb437f",
"id": "e164770d-ec63-11ee-ae7c-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-27T18:00:23.4576121Z",
"endExecutionTime": "2024-03-27T19:17:30.445654Z", "costEstimate": null, "itemType":
"Session"}, {"status": "Failed", "jobFailurePolicy": "Abort", "name": "session-9c62a899-ec64-11ee-9a13-b07d64eb437f",
"id": "9c62a899-ec64-11ee-9a13-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-27T18:05:38.6416267Z",
"endExecutionTime": "2024-03-27T18:06:17.8988901Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-b9089afc-ec64-11ee-86d4-b07d64eb437f", "id": "b9089afc-ec64-11ee-86d4-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T18:06:25.0205387Z", "endExecutionTime": "2024-03-27T18:07:52.0768581Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ed17c6a2-ec64-11ee-86f6-b07d64eb437f", "id": "ed17c6a2-ec64-11ee-86f6-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T18:07:53.8817869Z", "endExecutionTime": "2024-03-27T18:08:36.0863988Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-0d86c096-ec65-11ee-8458-b07d64eb437f", "id": "0d86c096-ec65-11ee-8458-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-27T18:08:46.7938634Z",
"endExecutionTime": "2024-03-27T18:08:57.8339269Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-16e91c1b-ec65-11ee-b46c-b07d64eb437f",
"id": "16e91c1b-ec65-11ee-b46c-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-27T18:09:02.7107404Z",
"endExecutionTime": "2024-03-27T19:17:14.5726832Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-9e7adffb-ec6e-11ee-a8cd-b07d64eb437f", "id": "9e7adffb-ec6e-11ee-a8cd-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T19:17:17.3341502Z", "endExecutionTime": "2024-03-27T19:17:42.5779753Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b03062ad-ec6e-11ee-8230-b07d64eb437f", "id": "b03062ad-ec6e-11ee-8230-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-27T19:17:45.8895256Z", "endExecutionTime": "2024-03-27T19:20:55.3954317Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-2567a98d-ec6f-11ee-889c-b07d64eb437f", "id": "2567a98d-ec6f-11ee-889c-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T19:21:03.5613593Z", "endExecutionTime": "2024-03-27T19:21:03.7995275Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-26bb8f2a-ec6f-11ee-8b98-b07d64eb437f", "id": "26bb8f2a-ec6f-11ee-8b98-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T19:21:05.7461926Z", "endExecutionTime": "2024-03-27T19:21:05.984219Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-28048f9c-ec6f-11ee-83f2-b07d64eb437f", "id": "28048f9c-ec6f-11ee-83f2-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T19:21:07.8189763Z", "endExecutionTime": "2024-03-27T19:21:08.0516733Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "0db22201-ec8f-11ee-954d-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:09:28.1449299Z", "endExecutionTime": "2024-03-27T23:19:37.7698596Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-0fe58ddb-ec8f-11ee-9213-b07d64eb437f", "id": "0fe58ddb-ec8f-11ee-9213-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-27T23:09:30.5151491Z",
"endExecutionTime": "2024-03-27T23:09:43.5674695Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-1947ede3-ec8f-11ee-ba8f-b07d64eb437f",
"id": "1947ede3-ec8f-11ee-ba8f-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-27T23:09:46.7347966Z",
"endExecutionTime": "2024-03-27T23:10:48.1680562Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Abort",
"name": "session-3e791101-ec8f-11ee-b503-b07d64eb437f", "id": "3e791101-ec8f-11ee-b503-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:10:49.938271Z", "endExecutionTime": "2024-03-27T23:11:23.1647652Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Failed", "jobFailurePolicy":
"Continue", "name": "session-5afb0447-ec8f-11ee-be5c-b07d64eb437f", "id":
"5afb0447-ec8f-11ee-be5c-b07d64eb437f", "providerId": "microsoft.test", "target":
"echo-quantinuum", "creationTime": "2024-03-27T23:11:36.3210814Z", "endExecutionTime":
"2024-03-27T23:13:17.6548659Z", "costEstimate": null, "itemType": "Session"},
{"status": "Succeeded", "jobFailurePolicy": "Abort", "name": "session-9795bf20-ec8f-11ee-9dbd-b07d64eb437f",
"id": "9795bf20-ec8f-11ee-9dbd-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-27T23:13:19.6504554Z",
"endExecutionTime": "2024-03-27T23:13:32.3704275Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-a1d5f421-ec8f-11ee-90b5-b07d64eb437f", "id": "a1d5f421-ec8f-11ee-90b5-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-27T23:13:35.3788508Z",
"endExecutionTime": "2024-03-27T23:13:46.2843526Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-ab2e5ee1-ec8f-11ee-8699-b07d64eb437f",
"id": "ab2e5ee1-ec8f-11ee-8699-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-03-27T23:13:51.0930717Z",
"endExecutionTime": "2024-03-27T23:14:46.0533718Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-caee5289-ec8f-11ee-9886-b07d64eb437f", "id": "caee5289-ec8f-11ee-9886-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:14:46.0700946Z", "endExecutionTime": "2024-03-27T23:15:01.0441057Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-d7d99642-ec8f-11ee-9976-b07d64eb437f", "id": "d7d99642-ec8f-11ee-9976-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-03-27T23:15:06.0268375Z", "endExecutionTime": "2024-03-27T23:15:44.6315795Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f0158d29-ec8f-11ee-b193-b07d64eb437f", "id": "f0158d29-ec8f-11ee-b193-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:15:48.1650283Z", "endExecutionTime": "2024-03-27T23:15:48.3906205Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f1605719-ec8f-11ee-8906-b07d64eb437f", "id": "f1605719-ec8f-11ee-8906-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:15:50.1456784Z", "endExecutionTime": "2024-03-27T23:15:50.3677791Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f28cea89-ec8f-11ee-924b-b07d64eb437f", "id": "f28cea89-ec8f-11ee-924b-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-27T23:15:52.1139345Z", "endExecutionTime": "2024-03-27T23:15:52.3402698Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "ef925932-edf2-11ee-b3ef-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-29T17:36:57.6432826Z", "endExecutionTime": "2024-03-29T17:48:04.4618325Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f1d9f248-edf2-11ee-897a-b07d64eb437f", "id": "f1d9f248-edf2-11ee-897a-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-03-29T17:36:59.7836922Z",
"endExecutionTime": "2024-03-29T17:37:14.0834204Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-52cc1e54-edf3-11ee-80e8-b07d64eb437f",
"id": "52cc1e54-edf3-11ee-80e8-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-03-29T17:39:42.4474557Z", "endExecutionTime":
"2024-03-29T17:39:54.3456118Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-7e1c383e-edf3-11ee-9b15-b07d64eb437f",
"id": "7e1c383e-edf3-11ee-9b15-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-03-29T17:40:56.8885395Z",
"endExecutionTime": "2024-03-29T17:40:57.1154135Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-7f756319-edf3-11ee-be1d-b07d64eb437f", "id": "7f756319-edf3-11ee-be1d-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-29T17:40:59.0764438Z", "endExecutionTime": "2024-03-29T17:40:59.2983931Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-80c21284-edf3-11ee-8fa2-b07d64eb437f", "id": "80c21284-edf3-11ee-8fa2-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-03-29T17:41:01.0850435Z", "endExecutionTime": "2024-03-29T17:41:01.5708957Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "00109f2f-f35c-11ee-9c0a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:51:38.9578237Z", "endExecutionTime": "2024-04-05T15:02:39.0853647Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Failed", "jobFailurePolicy":
"Abort", "name": "session-02e546ad-f35c-11ee-b957-b07d64eb437f", "id": "02e546ad-f35c-11ee-b957-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-05T14:51:41.3866351Z",
"endExecutionTime": "2024-04-05T14:51:47.0768244Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-09e8cac4-f35c-11ee-95aa-b07d64eb437f", "id": "09e8cac4-f35c-11ee-95aa-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-05T14:51:53.1524676Z", "endExecutionTime": "2024-04-05T14:52:38.834875Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Abort",
"name": "session-25c47d00-f35c-11ee-8c3b-b07d64eb437f", "id": "25c47d00-f35c-11ee-8c3b-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:52:41.6905542Z", "endExecutionTime": "2024-04-05T14:53:05.2294061Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Failed", "jobFailurePolicy":
"Continue", "name": "session-3b75a08a-f35c-11ee-8234-b07d64eb437f", "id":
"3b75a08a-f35c-11ee-8234-b07d64eb437f", "providerId": "microsoft.test", "target":
"echo-quantinuum", "creationTime": "2024-04-05T14:53:16.3453774Z", "endExecutionTime":
"2024-04-05T14:54:49.3781665Z", "costEstimate": null, "itemType": "Session"},
{"status": "Succeeded", "jobFailurePolicy": "Abort", "name": "session-731e7767-f35c-11ee-b27e-b07d64eb437f",
"id": "731e7767-f35c-11ee-b27e-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-05T14:54:51.4756922Z",
"endExecutionTime": "2024-04-05T14:55:04.1524379Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Abort",
"name": "session-7d88fec1-f35c-11ee-be6f-b07d64eb437f", "id": "7d88fec1-f35c-11ee-be6f-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-05T14:55:07.3528534Z",
"endExecutionTime": "2024-04-05T14:55:10.4063948Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-8257d8a2-f35c-11ee-83d9-b07d64eb437f", "id": "8257d8a2-f35c-11ee-83d9-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-05T14:55:15.2605778Z", "endExecutionTime": "2024-04-05T14:56:13.5936158Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-a6ec86db-f35c-11ee-8df2-b07d64eb437f", "id": "a6ec86db-f35c-11ee-8df2-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:56:18.3186668Z", "endExecutionTime": "2024-04-05T14:56:35.3993401Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b48864ac-f35c-11ee-9bbb-b07d64eb437f", "id": "b48864ac-f35c-11ee-9bbb-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-05T14:56:39.8193749Z", "endExecutionTime": "2024-04-05T14:58:09.8757326Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-f165bef1-f35c-11ee-bb07-b07d64eb437f", "id": "f165bef1-f35c-11ee-bb07-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:58:23.6945928Z", "endExecutionTime": "2024-04-05T14:58:23.9216736Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f2fa930e-f35c-11ee-8234-b07d64eb437f", "id": "f2fa930e-f35c-11ee-8234-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:58:26.1669709Z", "endExecutionTime": "2024-04-05T14:58:26.4167174Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-f476b546-f35c-11ee-a9af-b07d64eb437f", "id": "f476b546-f35c-11ee-a9af-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-05T14:58:28.6589349Z", "endExecutionTime": "2024-04-05T14:58:28.9259435Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Failed", "jobFailurePolicy":
"Abort", "name": "session-e1a6d850-f35e-11ee-99b3-b07d64eb437f", "id": "e1a6d850-f35e-11ee-99b3-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-05T15:12:14.4240094Z",
"endExecutionTime": "2024-04-05T15:12:18.8477514Z", "costEstimate": null,
"itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy": "Abort",
"name": "My Session", "id": "27315b75-f71c-11ee-90d6-b07d64eb437f", "providerId":
"microsoft.test", "target": "echo-quantinuum", "creationTime": "2024-04-10T09:24:46.6408244Z",
"endExecutionTime": "2024-04-10T09:36:00.3909046Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-2c79a636-f71c-11ee-907f-b07d64eb437f", "id": "2c79a636-f71c-11ee-907f-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-10T09:24:51.4954677Z",
"endExecutionTime": "2024-04-10T09:25:10.2347198Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-3b8bbf5f-f71c-11ee-aafb-b07d64eb437f",
"id": "3b8bbf5f-f71c-11ee-aafb-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-10T09:25:16.7967738Z",
"endExecutionTime": "2024-04-10T09:25:41.859823Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-4c469beb-f71c-11ee-98df-b07d64eb437f",
"id": "4c469beb-f71c-11ee-98df-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-10T09:25:50.7977219Z",
"endExecutionTime": "2024-04-10T09:26:06.7714811Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-61a8e1a5-f71c-11ee-805a-b07d64eb437f", "id": "61a8e1a5-f71c-11ee-805a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-10T09:26:20.6133407Z", "endExecutionTime": "2024-04-10T09:28:25.7782561Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ac8d056f-f71c-11ee-a001-b07d64eb437f", "id": "ac8d056f-f71c-11ee-a001-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-10T09:28:30.6663345Z", "endExecutionTime": "2024-04-10T09:28:44.1801784Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-bde89953-f71c-11ee-89e8-b07d64eb437f", "id": "bde89953-f71c-11ee-89e8-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-10T09:28:55.7250511Z",
"endExecutionTime": "2024-04-10T09:29:09.1301688Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-cc26b574-f71c-11ee-95a5-b07d64eb437f",
"id": "cc26b574-f71c-11ee-95a5-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-10T09:29:19.408427Z",
"endExecutionTime": "2024-04-10T09:29:43.831299Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-dda4e17a-f71c-11ee-b214-b07d64eb437f",
"id": "dda4e17a-f71c-11ee-b214-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-10T09:29:52.511643Z",
"endExecutionTime": "2024-04-10T09:30:38.6164601Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-049cd40e-f71d-11ee-8c44-b07d64eb437f", "id": "049cd40e-f71d-11ee-8c44-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-10T09:30:53.9554858Z", "endExecutionTime": "2024-04-10T09:31:21.371405Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-20224661-f71d-11ee-8d0a-b07d64eb437f", "id": "20224661-f71d-11ee-8d0a-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-10T09:31:44.0798484Z", "endExecutionTime": "2024-04-10T09:31:44.3772683Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-22d5e13d-f71d-11ee-80dd-b07d64eb437f", "id": "22d5e13d-f71d-11ee-80dd-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-10T09:31:48.4917027Z", "endExecutionTime": "2024-04-10T09:31:48.7667626Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-257ca9a7-f71d-11ee-b96f-b07d64eb437f", "id": "257ca9a7-f71d-11ee-b96f-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-10T09:31:52.7972104Z", "endExecutionTime": "2024-04-10T09:31:53.0562799Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "37c6b1c4-fc05-11ee-9ca0-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:23:05.1933682Z", "endExecutionTime": "2024-04-16T15:35:04.0323332Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-3a3b56d0-fc05-11ee-aa6f-b07d64eb437f", "id": "3a3b56d0-fc05-11ee-aa6f-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-16T15:23:07.9165444Z",
"endExecutionTime": "2024-04-16T15:23:22.0675145Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-4453b3a2-fc05-11ee-8370-b07d64eb437f",
"id": "4453b3a2-fc05-11ee-8370-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-16T15:23:24.870366Z",
"endExecutionTime": "2024-04-16T15:24:27.9745609Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-6c29566b-fc05-11ee-bac0-b07d64eb437f",
"id": "6c29566b-fc05-11ee-bac0-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-16T15:24:33.4210101Z",
"endExecutionTime": "2024-04-16T15:24:59.9465788Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-8340ea35-fc05-11ee-87fc-b07d64eb437f", "id": "8340ea35-fc05-11ee-87fc-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:25:10.2045997Z", "endExecutionTime": "2024-04-16T15:26:14.9007962Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-aa04685b-fc05-11ee-82ce-b07d64eb437f", "id": "aa04685b-fc05-11ee-82ce-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:26:17.0497634Z", "endExecutionTime": "2024-04-16T15:26:37.9432877Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-ba433c9a-fc05-11ee-9bad-b07d64eb437f", "id": "ba433c9a-fc05-11ee-9bad-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-16T15:26:42.6716112Z",
"endExecutionTime": "2024-04-16T15:26:54.1624704Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-c430f277-fc05-11ee-9856-b07d64eb437f",
"id": "c430f277-fc05-11ee-9856-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-16T15:26:59.3390533Z",
"endExecutionTime": "2024-04-16T15:27:18.515188Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-d023e1e6-fc05-11ee-9b9a-b07d64eb437f",
"id": "d023e1e6-fc05-11ee-9b9a-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-16T15:27:20.8978189Z",
"endExecutionTime": "2024-04-16T15:27:54.8490371Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-e86dcd8f-fc05-11ee-9e47-b07d64eb437f", "id": "e86dcd8f-fc05-11ee-9e47-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-16T15:27:59.9506717Z", "endExecutionTime": "2024-04-16T15:28:22.8352442Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-fd655de3-fc05-11ee-bf44-b07d64eb437f", "id": "fd655de3-fc05-11ee-bf44-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:28:37.0208033Z", "endExecutionTime": "2024-04-16T15:28:37.2497564Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-fecf7e39-fc05-11ee-a118-b07d64eb437f", "id": "fecf7e39-fc05-11ee-a118-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:28:39.3492685Z", "endExecutionTime": "2024-04-16T15:28:39.593361Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-00345384-fc06-11ee-9003-b07d64eb437f", "id": "00345384-fc06-11ee-9003-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-16T15:28:41.9543231Z", "endExecutionTime": "2024-04-16T15:28:42.1861162Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "56158e61-fcbf-11ee-a836-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:35:22.7844167Z", "endExecutionTime": "2024-04-17T13:47:04.0271631Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-59008544-fcbf-11ee-bb15-b07d64eb437f", "id": "59008544-fcbf-11ee-bb15-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-17T13:35:25.9557429Z",
"endExecutionTime": "2024-04-17T13:35:40.7495734Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-63be6808-fcbf-11ee-8c6a-b07d64eb437f",
"id": "63be6808-fcbf-11ee-8c6a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-17T13:35:43.9180759Z",
"endExecutionTime": "2024-04-17T13:36:10.8984861Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-764dd2f6-fcbf-11ee-8b00-b07d64eb437f",
"id": "764dd2f6-fcbf-11ee-8b00-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-17T13:36:17.1553384Z",
"endExecutionTime": "2024-04-17T13:36:27.5831112Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-835f9e5d-fcbf-11ee-ac59-b07d64eb437f", "id": "835f9e5d-fcbf-11ee-ac59-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:36:36.8439843Z", "endExecutionTime": "2024-04-17T13:37:29.728899Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-a31c9fb9-fcbf-11ee-82c7-b07d64eb437f", "id": "a31c9fb9-fcbf-11ee-82c7-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:37:31.9632818Z", "endExecutionTime": "2024-04-17T13:37:54.2324841Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-b44b75a7-fcbf-11ee-a8d4-b07d64eb437f", "id": "b44b75a7-fcbf-11ee-a8d4-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-17T13:37:59.0616209Z",
"endExecutionTime": "2024-04-17T13:38:09.8917348Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-bd8abfee-fcbf-11ee-b2f6-b07d64eb437f",
"id": "bd8abfee-fcbf-11ee-b2f6-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-17T13:38:14.6269469Z",
"endExecutionTime": "2024-04-17T13:38:39.1993987Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-ccace4fe-fcbf-11ee-bd8e-b07d64eb437f",
"id": "ccace4fe-fcbf-11ee-bd8e-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-17T13:38:41.5268594Z",
"endExecutionTime": "2024-04-17T13:39:20.1013135Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-ebcd9184-fcbf-11ee-9ac7-b07d64eb437f", "id": "ebcd9184-fcbf-11ee-9ac7-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-17T13:39:32.0376402Z", "endExecutionTime": "2024-04-17T13:40:06.1553412Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-08279a76-fcc0-11ee-aad1-b07d64eb437f", "id": "08279a76-fcc0-11ee-aad1-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:40:21.9041419Z", "endExecutionTime": "2024-04-17T13:40:22.1376168Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-09d3b28f-fcc0-11ee-bf61-b07d64eb437f", "id": "09d3b28f-fcc0-11ee-bf61-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:40:24.0731771Z", "endExecutionTime": "2024-04-17T13:40:24.313353Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-0b1f92c2-fcc0-11ee-8d43-b07d64eb437f", "id": "0b1f92c2-fcc0-11ee-8d43-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-17T13:40:26.28125Z", "endExecutionTime": "2024-04-17T13:40:26.5135795Z",
"costEstimate": null, "itemType": "Session"}, {"status": "TimedOut", "jobFailurePolicy":
"Abort", "name": "My Session", "id": "3a2616d7-fe5a-11ee-bdfe-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:36:38.8691091Z", "endExecutionTime": "2024-04-19T14:47:03.325294Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-3c4b6ebb-fe5a-11ee-bca1-b07d64eb437f", "id": "3c4b6ebb-fe5a-11ee-bca1-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-19T14:36:40.9692384Z",
"endExecutionTime": "2024-04-19T14:36:54.4566936Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-460c6726-fe5a-11ee-a74f-b07d64eb437f",
"id": "460c6726-fe5a-11ee-a74f-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-19T14:36:57.5162709Z",
"endExecutionTime": "2024-04-19T14:37:16.6477006Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Failed", "jobFailurePolicy": "Abort", "name": "session-52f19f9f-fe5a-11ee-b080-b07d64eb437f",
"id": "52f19f9f-fe5a-11ee-b080-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-19T14:37:20.5914732Z",
"endExecutionTime": "2024-04-19T14:37:48.8457092Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Failed", "jobFailurePolicy": "Continue",
"name": "session-6845f975-fe5a-11ee-88fc-b07d64eb437f", "id": "6845f975-fe5a-11ee-88fc-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:37:54.7630082Z", "endExecutionTime": "2024-04-19T14:38:30.1579207Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-7d8d0c13-fe5a-11ee-9a1d-b07d64eb437f", "id": "7d8d0c13-fe5a-11ee-9a1d-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:38:32.2140188Z", "endExecutionTime": "2024-04-19T14:39:11.6887716Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-982f8dca-fe5a-11ee-8b40-b07d64eb437f", "id": "982f8dca-fe5a-11ee-8b40-b07d64eb437f",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-19T14:39:15.3831564Z",
"endExecutionTime": "2024-04-19T14:47:00.213389Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-56ad401f-fe5b-11ee-a74a-b07d64eb437f",
"id": "56ad401f-fe5b-11ee-a74a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-19T14:44:36.0979809Z",
"endExecutionTime": "2024-04-19T14:45:39.1833723Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-7ecf712a-fe5b-11ee-91e4-b07d64eb437f",
"id": "7ecf712a-fe5b-11ee-91e4-b07d64eb437f", "providerId": "microsoft.test",
"target": "echo-quantinuum", "creationTime": "2024-04-19T14:45:43.5519397Z",
"endExecutionTime": "2024-04-19T14:46:16.2908472Z", "costEstimate": null,
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-97bb8833-fe5b-11ee-ab06-b07d64eb437f", "id": "97bb8833-fe5b-11ee-ab06-b07d64eb437f",
"providerId": "quantinuum", "target": "quantinuum.sim.h1-1e", "creationTime":
"2024-04-19T14:46:23.8884092Z", "endExecutionTime": "2024-04-19T14:49:02.0372437Z",
"costEstimate": {"currencyCode": "USD", "events": [], "estimatedTotal": 0.0},
"itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy": "Abort",
"name": "session-fc54ae16-fe5b-11ee-bf20-b07d64eb437f", "id": "fc54ae16-fe5b-11ee-bf20-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:49:14.4074255Z", "endExecutionTime": "2024-04-19T14:49:14.6187411Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-fda3ec46-fe5b-11ee-acd5-b07d64eb437f", "id": "fda3ec46-fe5b-11ee-acd5-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:49:16.3736305Z", "endExecutionTime": "2024-04-19T14:49:16.6014929Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-fed2ff60-fe5b-11ee-92be-b07d64eb437f", "id": "fed2ff60-fe5b-11ee-92be-b07d64eb437f",
"providerId": "microsoft.test", "target": "echo-quantinuum", "creationTime":
"2024-04-19T14:49:18.3209781Z", "endExecutionTime": "2024-04-19T14:49:18.5398629Z",
"costEstimate": null, "itemType": "Session"}, {"status": "Succeeded", "jobFailurePolicy":
"Abort", "name": "session-0040cde4-01c5-11ef-b367-f8e4e3ddcdd5", "id": "0040cde4-01c5-11ef-b367-f8e4e3ddcdd5",
"providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-04-23T22:58:30.0087799Z",
"endExecutionTime": "2024-04-23T22:58:44.1473388Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-0a0366a5-01c5-11ef-9baa-f8e4e3ddcdd5",
"id": "0a0366a5-01c5-11ef-9baa-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-23T22:58:46.5697104Z",
"endExecutionTime": "2024-04-23T22:59:16.6499269Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-1f5890b2-01c5-11ef-a9f3-f8e4e3ddcdd5",
"id": "1f5890b2-01c5-11ef-a9f3-f8e4e3ddcdd5", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-23T22:59:22.1698839Z", "endExecutionTime":
"2024-04-23T22:59:31.3735102Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-26a326f9-01c5-11ef-8007-f8e4e3ddcdd5",
"id": "26a326f9-01c5-11ef-8007-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-23T22:59:34.6448932Z",
"endExecutionTime": "2024-04-23T22:59:53.971255Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-35547b0e-01c5-11ef-ba9f-f8e4e3ddcdd5",
"id": "35547b0e-01c5-11ef-ba9f-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-23T22:59:59.0578043Z",
"endExecutionTime": "2024-04-23T23:00:21.5687168Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-3f28cb2c-048b-11ef-818f-b07d64eb437f",
"id": "3f28cb2c-048b-11ef-818f-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-27T11:42:39.1633565Z", "endExecutionTime":
"2024-04-27T11:42:54.489769Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-4aa08f90-048b-11ef-9dda-b07d64eb437f",
"id": "4aa08f90-048b-11ef-9dda-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T11:42:58.2402605Z",
"endExecutionTime": "2024-04-27T11:43:32.0941495Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-665abe14-048b-11ef-87ac-b07d64eb437f",
"id": "665abe14-048b-11ef-87ac-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-27T11:43:44.7551245Z", "endExecutionTime":
"2024-04-27T11:43:56.0913051Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-714e7101-048b-11ef-ab04-b07d64eb437f",
"id": "714e7101-048b-11ef-ab04-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T11:44:03.281218Z",
"endExecutionTime": "2024-04-27T11:44:25.5294079Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-82a7b3c8-048b-11ef-924f-b07d64eb437f",
"id": "82a7b3c8-048b-11ef-924f-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T11:44:32.2373921Z",
"endExecutionTime": "2024-04-27T11:45:03.5000636Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-20e43772-04a8-11ef-9f89-b07d64eb437f",
"id": "20e43772-04a8-11ef-9f89-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-27T15:09:23.7038271Z", "endExecutionTime":
"2024-04-27T15:09:39.0499754Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-2c9dbfee-04a8-11ef-bb09-b07d64eb437f",
"id": "2c9dbfee-04a8-11ef-bb09-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T15:09:43.0266731Z",
"endExecutionTime": "2024-04-27T15:10:11.557679Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-435296a4-04a8-11ef-8b0a-b07d64eb437f",
"id": "435296a4-04a8-11ef-8b0a-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-27T15:10:21.1208094Z", "endExecutionTime":
"2024-04-27T15:10:32.2422463Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-4de2df9b-04a8-11ef-a18a-b07d64eb437f",
"id": "4de2df9b-04a8-11ef-a18a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T15:10:39.1696136Z",
"endExecutionTime": "2024-04-27T15:10:55.3711888Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-5dc0c2bc-04a8-11ef-8c03-b07d64eb437f",
"id": "5dc0c2bc-04a8-11ef-8c03-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-27T15:11:05.4611284Z",
"endExecutionTime": "2024-04-27T15:11:32.4873704Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-55a0d8e3-06dc-11ef-948c-b07d64eb437f",
"id": "55a0d8e3-06dc-11ef-948c-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T10:28:08.0234167Z", "endExecutionTime":
"2024-04-30T10:28:23.3644251Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-61553094-06dc-11ef-8f84-b07d64eb437f",
"id": "61553094-06dc-11ef-8f84-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T10:28:27.4464368Z",
"endExecutionTime": "2024-04-30T10:28:49.0991072Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-74d11f73-06dc-11ef-a284-b07d64eb437f",
"id": "74d11f73-06dc-11ef-a284-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T10:29:00.140077Z", "endExecutionTime":
"2024-04-30T10:29:11.0415005Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-7f54f797-06dc-11ef-87c7-b07d64eb437f",
"id": "7f54f797-06dc-11ef-87c7-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T10:29:18.0537745Z",
"endExecutionTime": "2024-04-30T10:29:41.3886598Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-92331889-06dc-11ef-86f0-b07d64eb437f",
"id": "92331889-06dc-11ef-86f0-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T10:29:49.4408364Z",
"endExecutionTime": "2024-04-30T10:30:14.2873828Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-1fdac98c-06fd-11ef-b68b-b07d64eb437f",
"id": "1fdac98c-06fd-11ef-b68b-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T14:22:51.2912502Z", "endExecutionTime":
"2024-04-30T14:23:06.3764794Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-2b58b8d4-06fd-11ef-ba34-b07d64eb437f",
"id": "2b58b8d4-06fd-11ef-ba34-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T14:23:10.3352163Z",
"endExecutionTime": "2024-04-30T14:23:34.2564424Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-3f8cf3b8-06fd-11ef-8b9b-b07d64eb437f",
"id": "3f8cf3b8-06fd-11ef-8b9b-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T14:23:44.2377859Z", "endExecutionTime":
"2024-04-30T14:23:55.9020879Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-4a735790-06fd-11ef-8e9a-b07d64eb437f",
"id": "4a735790-06fd-11ef-8e9a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T14:24:02.727593Z",
"endExecutionTime": "2024-04-30T14:24:24.0332289Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-5ccc654e-06fd-11ef-8c57-b07d64eb437f",
"id": "5ccc654e-06fd-11ef-8c57-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T14:24:33.3089827Z",
"endExecutionTime": "2024-04-30T14:24:56.9601093Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-4b7e4805-0731-11ef-91a4-b07d64eb437f",
"id": "4b7e4805-0731-11ef-91a4-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T20:36:18.2011355Z", "endExecutionTime":
"2024-04-30T20:36:31.4398325Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-55507a3a-0731-11ef-965a-b07d64eb437f",
"id": "55507a3a-0731-11ef-965a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T20:36:34.8557609Z",
"endExecutionTime": "2024-04-30T20:37:06.9665064Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-6e00d288-0731-11ef-9be7-b07d64eb437f",
"id": "6e00d288-0731-11ef-9be7-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T20:37:16.0966668Z", "endExecutionTime":
"2024-04-30T20:37:26.9838483Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-77457095-0731-11ef-bb51-b07d64eb437f",
"id": "77457095-0731-11ef-bb51-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T20:37:31.9936402Z",
"endExecutionTime": "2024-04-30T20:38:05.8464882Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-8f0e888d-0731-11ef-8f53-b07d64eb437f",
"id": "8f0e888d-0731-11ef-8f53-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T20:38:11.5554122Z",
"endExecutionTime": "2024-04-30T20:38:46.312493Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-97040771-073c-11ef-9f45-f8e4e3ddcdd5",
"id": "97040771-073c-11ef-9f45-f8e4e3ddcdd5", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T21:57:10.0509942Z", "endExecutionTime":
"2024-04-30T21:57:22.1658922Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-a094a5fa-073c-11ef-bad9-f8e4e3ddcdd5",
"id": "a094a5fa-073c-11ef-bad9-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T21:57:25.9320259Z",
"endExecutionTime": "2024-04-30T21:57:54.7718659Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-b6d3ac65-073c-11ef-b361-f8e4e3ddcdd5",
"id": "b6d3ac65-073c-11ef-b361-f8e4e3ddcdd5", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-04-30T21:58:02.9689126Z", "endExecutionTime":
"2024-04-30T21:58:12.0242122Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-be5529e9-073c-11ef-96f4-f8e4e3ddcdd5",
"id": "be5529e9-073c-11ef-96f4-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T21:58:16.2438506Z",
"endExecutionTime": "2024-04-30T21:58:36.9045575Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-cde8f824-073c-11ef-93c5-f8e4e3ddcdd5",
"id": "cde8f824-073c-11ef-93c5-f8e4e3ddcdd5", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-04-30T21:58:41.6908371Z",
"endExecutionTime": "2024-04-30T21:59:09.8019609Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-32035c58-07e5-11ef-8d0a-b07d64eb437f",
"id": "32035c58-07e5-11ef-8d0a-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-05-01T18:04:05.4262806Z", "endExecutionTime":
"2024-05-01T18:04:22.637444Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-3e5d7b4c-07e5-11ef-b83a-b07d64eb437f",
"id": "3e5d7b4c-07e5-11ef-b83a-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-05-01T18:04:25.8234135Z",
"endExecutionTime": "2024-05-01T18:04:54.0355864Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-557ac7d9-07e5-11ef-bc46-b07d64eb437f",
"id": "557ac7d9-07e5-11ef-bc46-b07d64eb437f", "providerId": "ionq", "target":
"ionq.simulator", "creationTime": "2024-05-01T18:05:04.6011743Z", "endExecutionTime":
"2024-05-01T18:05:18.0948946Z", "costEstimate": {"currencyCode": "USD", "events":
[], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status": "Succeeded",
"jobFailurePolicy": "Abort", "name": "session-614613c2-07e5-11ef-acdc-b07d64eb437f",
"id": "614613c2-07e5-11ef-acdc-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-05-01T18:05:25.0658938Z",
"endExecutionTime": "2024-05-01T18:05:43.0826567Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}, {"status":
"Succeeded", "jobFailurePolicy": "Abort", "name": "session-71ddd7b5-07e5-11ef-90aa-b07d64eb437f",
"id": "71ddd7b5-07e5-11ef-90aa-b07d64eb437f", "providerId": "quantinuum",
"target": "quantinuum.sim.h1-1e", "creationTime": "2024-05-01T18:05:52.2237551Z",
"endExecutionTime": "2024-05-01T18:06:15.3479079Z", "costEstimate": {"currencyCode":
"USD", "events": [], "estimatedTotal": 0.0}, "itemType": "Session"}], "nextLink":
null}'
headers:
connection:
- keep-alive
content-length:
- '145549'
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
status:
code: 200
message: OK
version: 1
|
azure-quantum-python/azure-quantum/tests/unit/recordings/test_session_list_sessions.yaml/0
|
{
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_session_list_sessions.yaml",
"repo_id": "azure-quantum-python",
"token_count": 78339
}
| 353 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
from pathlib import Path
from unittest.mock import patch
import json
import os
import time
import urllib3
import pytest
from common import (
QuantumTestBase,
SUBSCRIPTION_ID,
RESOURCE_GROUP,
WORKSPACE,
LOCATION,
API_KEY,
)
from azure.identity import (
CredentialUnavailableError,
ClientSecretCredential,
InteractiveBrowserCredential,
)
from azure.quantum import Workspace
from azure.quantum._authentication import (
_TokenFileCredential,
_DefaultAzureCredential,
)
from azure.quantum._constants import (
EnvironmentVariables,
ConnectionConstants,
)
class TestWorkspace(QuantumTestBase):
def test_azure_quantum_token_credential_file_not_set(self):
credential = _TokenFileCredential()
with pytest.raises(CredentialUnavailableError) as exception:
credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertIn("Token file location not set.", str(exception.value))
def test_azure_quantum_token_credential_file_not_exists(self):
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: "fake_file_path"},
clear=True):
with patch('os.path.isfile') as mock_isfile:
mock_isfile.return_value = False
credential = _TokenFileCredential()
with pytest.raises(CredentialUnavailableError) as exception:
credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertIn("Token file at fake_file_path does not exist.",
str(exception.value))
def test_azure_quantum_token_credential_file_invalid_json(self):
tmpdir = self.create_temp_dir()
file = Path(tmpdir) / "token.json"
file.write_text("not a json")
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: str(file.resolve())},
clear=True):
credential = _TokenFileCredential()
with pytest.raises(CredentialUnavailableError) as exception:
credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertIn("Failed to parse token file: Invalid JSON.",
str(exception.value))
def test_azure_quantum_token_credential_file_missing_expires_on(self):
content = {
"access_token": "fake_token",
}
tmpdir = self.create_temp_dir()
file = Path(tmpdir) / "token.json"
file.write_text(json.dumps(content))
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: str(file.resolve())},
clear=True):
credential = _TokenFileCredential()
with pytest.raises(CredentialUnavailableError) as exception:
credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertIn("Failed to parse token file: " +
"Missing expected value: 'expires_on'""",
str(exception.value))
def test_azure_quantum_token_credential_file_token_expired(self):
content = {
"access_token": "fake_token",
# Matches timestamp in error message below
"expires_on": 1628543125086
}
tmpdir = self.create_temp_dir()
file = Path(tmpdir) / "token.json"
file.write_text(json.dumps(content))
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: str(file.resolve())},
clear=True):
credential = _TokenFileCredential()
with pytest.raises(CredentialUnavailableError) as exception:
credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertIn("Token already expired at Mon Aug 9 21:05:25 2021",
str(exception.value))
def test_azure_quantum_token_credential_file_valid_token(self):
one_hour_ahead = time.time() + 60*60
content = {
"access_token": "fake_token",
"expires_on": one_hour_ahead * 1000 # Convert to milliseconds
}
tmpdir = self.create_temp_dir()
file = Path(tmpdir) / "token.json"
file.write_text(json.dumps(content))
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: str(file.resolve())},
clear=True):
credential = _TokenFileCredential()
token = credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
self.assertEqual(token.token, "fake_token")
self.assertEqual(token.expires_on, pytest.approx(one_hour_ahead))
@pytest.mark.live_test
def test_workspace_auth_token_credential(self):
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
connection_params = self.connection_params
credential = ClientSecretCredential(connection_params.tenant_id,
connection_params.client_id,
self._client_secret)
token = credential.get_token(ConnectionConstants.DATA_PLANE_CREDENTIAL_SCOPE)
content = {
"access_token": token.token,
"expires_on": token.expires_on * 1000
}
tmpdir = self.create_temp_dir()
file = Path(tmpdir) / "token.json"
try:
file.write_text(json.dumps(content))
with patch.dict(os.environ,
{EnvironmentVariables.QUANTUM_TOKEN_FILE: str(file.resolve())},
clear=True):
credential = _TokenFileCredential()
workspace = self.create_workspace(credential=credential)
targets = workspace.get_targets()
self.assertGreater(len(targets), 1)
finally:
os.remove(file)
@pytest.mark.live_test
def test_workspace_auth_client_secret_credential(self):
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
connection_params = self.connection_params
credential = ClientSecretCredential(
tenant_id=connection_params.tenant_id,
client_id=connection_params.client_id,
client_secret=self._client_secret)
workspace = self.create_workspace(credential=credential)
targets = workspace.get_targets()
self.assertGreater(len(targets), 1)
@pytest.mark.live_test
def test_workspace_auth_default_credential(self):
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
connection_params = self.connection_params
os.environ[EnvironmentVariables.AZURE_CLIENT_ID] = \
connection_params.client_id
os.environ[EnvironmentVariables.AZURE_CLIENT_SECRET] = \
self._client_secret
os.environ[EnvironmentVariables.AZURE_TENANT_ID] = \
connection_params.tenant_id
credential = _DefaultAzureCredential(
subscription_id=connection_params.subscription_id,
arm_endpoint=connection_params.arm_endpoint)
workspace = self.create_workspace(credential=credential)
targets = workspace.get_targets()
self.assertGreater(len(targets), 1)
@pytest.mark.skip(reason="Only to be used in manual testing")
@pytest.mark.live_test
def test_workspace_auth_interactive_credential(self):
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
connection_params = self.connection_params
credential = InteractiveBrowserCredential(
tenant_id=connection_params.tenant_id)
workspace = self.create_workspace(credential=credential)
targets = workspace.get_targets()
self.assertGreater(len(targets), 1)
def _get_rp_credential(self):
connection_params = self.connection_params
# We have to use DefaultAzureCredential to avoid using ApiKeyCredential
credential = _DefaultAzureCredential(
subscription_id=connection_params.subscription_id,
arm_endpoint=connection_params.arm_endpoint,
tenant_id=connection_params.tenant_id)
scope = ConnectionConstants.ARM_CREDENTIAL_SCOPE
token = credential.get_token(scope).token
return token
def _get_workspace(self, token: str):
http = urllib3.PoolManager()
connection_params = self.connection_params
resource_id = ConnectionConstants.VALID_RESOURCE_ID(
subscription_id=connection_params.subscription_id,
resource_group=connection_params.resource_group,
workspace_name=connection_params.workspace_name,
)
url = (connection_params.arm_endpoint.rstrip('/') +
f"{resource_id}?api-version=2023-11-13-preview")
# Get workspace object
response = http.request(
method="GET",
url=url,
headers={
"Authorization": f"Bearer {token}"
}
)
self.assertEqual(response.status, 200,
f"""
{url} failed with error code {response.status}.
Make sure the environment variables are correctly
set with the workspace connection parameters.
""")
workspace = json.loads(response.data.decode("utf-8"))
return workspace
def _enable_workspace_api_keys(self, token: str, workspace: dict, enable_api_keys: bool):
http = urllib3.PoolManager()
# enable api key
workspace["properties"]["apiKeyEnabled"] = enable_api_keys
workspace_json = json.dumps(workspace)
connection_params = self.connection_params
resource_id = ConnectionConstants.VALID_RESOURCE_ID(
subscription_id=connection_params.subscription_id,
resource_group=connection_params.resource_group,
workspace_name=connection_params.workspace_name,
)
url = (connection_params.arm_endpoint.rstrip('/') +
f"{resource_id}?api-version=2023-11-13-preview")
response = http.request(
method="PUT",
url=url,
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json" # Assuming workspace is JSON data
},
body=workspace_json
)
self.assertEqual(response.status, 200,
f"""
{url} failed with error code {response.status}.
Failed to enable/disable api key.
""")
def _get_current_primary_connection_string(self, token: str):
# list keys
http = urllib3.PoolManager()
connection_params = self.connection_params
resource_id = ConnectionConstants.VALID_RESOURCE_ID(
subscription_id=connection_params.subscription_id,
resource_group=connection_params.resource_group,
workspace_name=connection_params.workspace_name,
)
url = (connection_params.arm_endpoint.rstrip('/') +
f"{resource_id}/listKeys?api-version=2023-11-13-preview")
response = http.request(
method="POST",
url=url,
headers={
"Authorization": f"Bearer {token}"
}
)
self.assertEqual(response.status, 200,
f"""
{url} failed with error code {response.status}.
Make sure the environment variables are correctly
set with the workspace connection parameters.
""")
connection_strings = json.loads(response.data.decode("utf-8"))
self.assertTrue(connection_strings['apiKeyEnabled'],
f"""
API-Key is not enabled in workspace {resource_id}
""")
connection_string = connection_strings['primaryConnectionString']
self.assertIsNotNone(connection_string,
f"""
primaryConnectionString is empty or does not exist
in workspace {resource_id}
""")
return connection_string
@pytest.mark.live_test
def test_workspace_auth_connection_string_api_key(self):
connection_string = ""
if self.is_playback:
connection_string = ConnectionConstants.VALID_CONNECTION_STRING(
subscription_id=SUBSCRIPTION_ID,
resource_group=RESOURCE_GROUP,
workspace_name=WORKSPACE,
api_key=API_KEY,
quantum_endpoint=ConnectionConstants.GET_QUANTUM_PRODUCTION_ENDPOINT(LOCATION))
else:
self.pause_recording()
token = self._get_rp_credential()
workspace = self._get_workspace(token)
self._enable_workspace_api_keys(token, workspace, True)
connection_string = self._get_current_primary_connection_string(token)
self.resume_recording()
# Sleep 1 min for cache to be cleared
time.sleep(60)
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
workspace = Workspace.from_connection_string(
connection_string=connection_string,
)
jobs = workspace.list_jobs()
assert len(jobs) >= 0
if self.is_live:
self.pause_recording()
token = self._get_rp_credential()
workspace = self._get_workspace(token)
self._enable_workspace_api_keys(token, workspace, False)
self.resume_recording()
# Sleep 1 min for cache to be cleared
time.sleep(60)
with patch.dict(os.environ):
self.clear_env_vars(os.environ)
workspace = Workspace.from_connection_string(
connection_string=connection_string,
)
with self.assertRaises(Exception) as context:
workspace.list_jobs()
self.assertIn("Unauthorized", context.exception.message)
|
azure-quantum-python/azure-quantum/tests/unit/test_authentication.py/0
|
{
"file_path": "azure-quantum-python/azure-quantum/tests/unit/test_authentication.py",
"repo_id": "azure-quantum-python",
"token_count": 7131
}
| 354 |
Import-Module (Join-Path $PSScriptRoot "conda-utils.psm1");
function PackagesList{
param(
[string] $PackageName
)
if ('' -eq $PackageName) {
# If no package dir is specified, find all packages that contain an environment.yml file
$parentPath = Split-Path -parent $PSScriptRoot
$PackageNames = Get-ChildItem -Path $parentPath -Recurse -Filter "environment.yml" | Select-Object -ExpandProperty Directory | Split-Path -Leaf
Write-Host "##[info]No PackageDir. Setting to default '$PackageNames'"
} else {
$PackageNames = @($PackageName)
}
return $PackageNames
}
function Install-Package() {
param(
[string] $EnvName,
[string] $PackageName,
[bool] $FromSource,
[string] $BuildArtifactPath
)
# Activate env
Use-CondaEnv $EnvName
# Show all installed packages
conda list
# Install package
if ($True -eq $FromSource) {
$ParentPath = Split-Path -parent $PSScriptRoot
$AbsPackageName = Join-Path $ParentPath $PackageName
Write-Host "##[info]Install package $AbsPackageName in development mode for env $EnvName"
pip install -e $AbsPackageName
} elseif ("" -ne $BuildArtifactPath) {
Write-Host "##[info]Installing $PackageName from $BuildArtifactPath"
Push-Location $BuildArtifactPath
pip install $PackageName --pre --find-links $BuildArtifactPath
if ($LASTEXITCODE -ne 0) { throw "Error installing qsharp-core wheel" }
Pop-Location
} else {
Write-Host "##[info]Install latest package $PackageName for env $EnvName from PyPI"
pip install $PackageName
}
}
function GetEnvName {
param (
[string] $PackageName,
[string] $CondaEnvironmentSuffix
)
# The environment name is based on $PackageName, but
# 1. if the name includes the version via name==version, remove the version,
# 2. add conda env suffix
# 3. remove "-" since its invalid
# 4. remove ".aio" and use the same environment as the non-async version
return ($PackageName.Split("[")[0].Split("=")[0] + $CondaEnvironmentSuffix).replace("-", "").replace(".aio", "")
}
function Install-PackageInEnv {
param (
[string] $PackageName,
[string] $CondaEnvironmentSuffix,
[bool] $FromSource,
[string] $BuildArtifactPath
)
$PackageNames = PackagesList -PackageName $PackageName
foreach ($PackageName in $PackageNames) {
$EnvName = GetEnvName -PackageName $PackageName -CondaEnvironmentSuffix $CondaEnvironmentSuffix
Install-Package -EnvName $EnvName -PackageName $PackageName -FromSource $FromSource -BuildArtifactPath $BuildArtifactPath
}
}
function New-CondaEnvironment {
param(
[string] $PackageName,
[string] $CondaEnvironmentSuffix
)
<#
.SYNOPSIS
Create Conda environment(s) for given package directories
Optionally, use CondaEnvironmentSuffix to specify a special environment file with name environment<CondaEnvironmentSuffix>.yml.
If PackageName is not specified, get all packages in the root directory.
#>
$PackageNames = PackagesList -PackageName $PackageName
foreach ($PackageName in $PackageNames) {
NewCondaEnvForPackage -PackageName $PackageName -CondaEnvironmentSuffix $CondaEnvironmentSuffix
}
}
function NewCondaEnvForPackage {
param(
[string] $PackageName,
[string] $CondaEnvironmentSuffix
)
<#
.SYNOPSIS
Create Conda environment(s) for given package directories
Optionally, use CondaEnvironmentSuffix to specify a special environment file with name environment<CondaEnvironmentSuffix>.yml.
#>
$parentPath = Split-Path -parent $PSScriptRoot
$EnvPath = Join-Path $parentPath $PackageName "environment$CondaEnvironmentSuffix.yml"
$EnvName = GetEnvName -PackageName $PackageName -CondaEnvironmentSuffix $CondaEnvironmentSuffix
# Check if environment already exists
$EnvExists = conda env list | Select-String -Pattern "$EnvName " | Measure-Object | Select-Object -Exp Count
# If it exists, skip creation
if ($EnvExists -eq "1") {
Write-Host "##[info]Skipping creating $EnvName; env already exists."
} else {
# If it does not exist, create conda environment
Write-Host "##[info]Build '$EnvPath' for Conda environment $EnvName"
conda env create --quiet --file $EnvPath
}
}
function New-Wheel() {
param(
[string] $EnvName,
[string] $Path,
[string] $OutDir
);
Push-Location $Path
# Set environment vars to be able to run conda activate
Write-Host "##[info]Pack wheel for env '$EnvName'"
# Activate env
Use-CondaEnv $EnvName
# Create package distribution
python setup.py bdist_wheel sdist --formats=gztar
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to build $Path."
$script:all_ok = $False
} else {
if ($OutDir -ne "") {
Write-Host "##[info]Copying wheel to '$OutDir'"
Copy-Item "dist/*.whl" $OutDir/
Copy-Item "dist/*.tar.gz" $OutDir/
}
}
Pop-Location
}
function Invoke-Tests() {
param(
[string] $PackageName,
[string] $EnvName
)
$ParentPath = Split-Path -parent $PSScriptRoot
$AbsPackageDir = Join-Path $ParentPath $PackageName
"##[info]Test package $AbsPackageDir and run tests for env $EnvName" | Write-Host
# Activate env
Use-CondaEnv $EnvName | Write-Host
# Install testing deps
python -m pip install --upgrade pip | Write-Host
pip install pytest pytest-azurepipelines pytest-cov | Write-Host
# Run tests
$PkgName = $PackageName.replace("-", ".")
pytest --cov-report term --cov=$PkgName --junitxml test-output-$PackageName.xml $AbsPackageDir | Write-Host
return ($LASTEXITCODE -eq 0)
}
|
azure-quantum-python/build/package-utils.psm1/0
|
{
"file_path": "azure-quantum-python/build/package-utils.psm1",
"repo_id": "azure-quantum-python",
"token_count": 2396
}
| 355 |
<jupyter_start><jupyter_text>Estimates with tools producing QIRAzure Quantum Resource Estimation is built upon [QIR](https://www.qir-alliance.org/), the forward-looking, fully interoperable specification for quantum programs. In this notebook, we are showing how to use the `azure.quantum` Python package to directly submit QIR to the Resource Estimation target. We are using [PyQIR](https://github.com/qir-alliance/pyqir) to generate QIR, however the example works with any other source of QIR as well. PyQIR can help you as a library to generate QIR from other quantum programming languages, and thereby enabling their execution on Azure Quantum Resource Estimator. Getting startedWe import several Python classes and functions from `azure.quantum` and `pyqir`.<jupyter_code>from azure.quantum import Workspace
from azure.quantum.target.microsoft import MicrosoftEstimator
# Support code to transition from pyqir-generator to pyqir package
try:
from pyqir.generator import BasicQisBuilder, SimpleModule
except:
from pyqir import BasicQisBuilder, SimpleModule<jupyter_output><empty_output><jupyter_text>We connect to the Azure Quantum workspace.<jupyter_code>workspace = Workspace(
resource_id = "",
location = ""
)<jupyter_output><empty_output><jupyter_text>We create an instance of the Resource Estimator in that workspace. Make sure that you have the _Microsoft Quantum Computing_ provider added to the workspace.<jupyter_code>estimator = MicrosoftEstimator(workspace)<jupyter_output><empty_output><jupyter_text>Running a sample quantum programLet's now create some QIR bitcode using PyQIR generator. Here, we build a controlled S gate using 3 T gates and 2 CNOT gates.<jupyter_code>module = SimpleModule("Controlled S", num_qubits=2, num_results=0)
qis = BasicQisBuilder(module.builder)
[a, b] = module.qubits[0:2]
qis.t(a)
qis.t(b)
qis.cx(a, b)
qis.t_adj(b)
qis.cx(a, b)<jupyter_output><empty_output><jupyter_text>Before we submit the QIR to the resource estimator, let's take a look at the QIRoutput for this module. We can use the `ir` function from PyQIR for thatpurpose, that generates human-readable instructions.<jupyter_code>print(module.ir())<jupyter_output><empty_output><jupyter_text>The QIR we submit to the function defined above must be passed in bitcodeformat. We obtain this format by calling `bitcode` instead of `ir` on themodule. We can also pass resource estimation specific arguments, e.g., settingthe error rate to 0.5%.<jupyter_code>params = estimator.make_params()
params.error_budget = 0.005
job = estimator.submit(module.bitcode(), input_params=params)
result = job.get_results()<jupyter_output><empty_output><jupyter_text>Finally, we print the resource estimation table.<jupyter_code>result<jupyter_output><empty_output>
|
azure-quantum-python/samples/resource-estimator/estimation-qir.ipynb/0
|
{
"file_path": "azure-quantum-python/samples/resource-estimator/estimation-qir.ipynb",
"repo_id": "azure-quantum-python",
"token_count": 848
}
| 356 |
.grid-container {
display: flex;
flex-wrap: nowrap;
min-height: 800px;
width: 100%;
background-color: white;
}
.diagram {
flex: 3 1 0;
overflow: hidden;
justify-content: center;
align-items: center;
background-color: white;
}
.table {
min-width: 320px;
flex: 1 1 0;
margin-left: 5px;
align-self: center;
}
|
azure-quantum-python/visualization/react-lib/src/components/resource-estimator/Diagram.css/0
|
{
"file_path": "azure-quantum-python/visualization/react-lib/src/components/resource-estimator/Diagram.css",
"repo_id": "azure-quantum-python",
"token_count": 133
}
| 357 |
Tokenizer
=========
.. testsetup:: *
from bistring import RegexTokenizer, SplittingTokenizer, CharacterTokenizer, WordTokenizer, SentenceTokenizer
.. autoclass:: bistring.Tokenizer
.. autoclass:: bistring.RegexTokenizer
.. autoclass:: bistring.SplittingTokenizer
.. autoclass:: bistring.CharacterTokenizer
.. autoclass:: bistring.WordTokenizer
.. autoclass:: bistring.SentenceTokenizer
|
bistring/docs/Python/Tokenizer.rst/0
|
{
"file_path": "bistring/docs/Python/Tokenizer.rst",
"repo_id": "bistring",
"token_count": 130
}
| 358 |
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT license.
*/
export type Bounds = readonly [number, number];
export type BiIndex = readonly [number, number];
type CostFn<T, U> = (o?: T, m?: U) => number;
/**
* An alignment between two related sequences.
*
* Consider this alignment between two strings:
*
* .. code-block:: text
*
* |it's| |aligned!|
* | \ \ |
* |it is| |aligned|
*
* An alignment stores all the indices that are known to correspond between the original and modified sequences. For
* the above example, it would be
*
* .. code-block:: ts
*
* let a = new Alignment([
* [0, 0],
* [4, 5],
* [5, 6],
* [13, 13],
* ]);
*
* Alignments can be used to answer questions like, "what's the smallest range of the original sequence that is
* guaranteed to contain this part of the modified sequence?" For example, the range `(0, 5)` ("it is") is known to
* match the range `(0, 4)` ("it's") of the original sequence.
*
* .. code-block:: ts
*
* console.log(a.original_bounds(0, 5));
* // [0, 4]
*
* Results may be imprecise if the alignment is too course to match the exact inputs:
*
* .. code-block:: ts
*
* console.log(a.original_bounds(0, 2));
* // [0, 4]
*
* A more granular alignment like this:
*
* .. code-block:: text
*
* |i|t|'s| |a|l|i|g|n|e|d|!|
* | | | \ \ \ \ \ \ \ \ \ /
* |i|t| is| |a|l|i|g|n|e|d|
*
* .. code-block:: ts
*
* a = new Alignment([
* [0, 0], [1, 1], [2, 2], [4, 5], [5, 6], [6, 7], [7, 8],
* [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 13],
* ]);
*
* Can be more precise:
*
* .. code-block:: ts
*
* console.log(a.original_bounds(0, 2));
* // [0, 2]
*/
export default class Alignment {
/** The pairs of aligned indices in this alignment. */
readonly values: readonly BiIndex[];
/** The number of entries in this alignment. */
readonly length: number;
/**
* Create a new Alignment.
*
* @param values
* The pairs of indices to align. Each element should be a pair destructurable as `[x, y]`, where `x` is
* the original sequence position and `y` is the modified sequence position.
*/
constructor(values: Iterable<BiIndex>) {
const copy: BiIndex[] = [];
for (const [o, m] of values) {
if (copy.length > 0) {
const [oPrev, mPrev] = copy[copy.length - 1];
if (o < oPrev) {
throw new Error("Original sequence position moved backwards")
} else if (m < mPrev) {
throw new Error("Modified sequence position moved backwards")
} else if (o === oPrev && m === mPrev) {
continue;
}
}
copy.push(Object.freeze([o, m] as BiIndex));
}
if (copy.length === 0) {
throw new Error("No sequence positions to align");
}
this.values = Object.freeze(copy);
this.length = copy.length;
Object.freeze(this);
}
/**
* Create an identity alignment of the given size, which maps all intervals to themselves.
*
* @param size
* The size of the sequences to align.
* @returns
* The identity alignment for the bounds [0, `size`].
*/
static identity(size: number): Alignment;
/**
* Create an identity alignment between the given bounds.
*
* @param start
* The first index to align.
* @param end
* The last index to align.
* @returns
* The identity alignment for the bounds [`start`, `end`].
*/
static identity(start: number, end: number): Alignment;
/**
* Create an identity alignment with the given bounds.
*
* @param bounds
* The bounds of the alignment (e.g. ``[1, 5]``).
* @returns
* The identity alignment for the given bounds.
*/
static identity(bounds: Bounds): Alignment;
static identity(start: number | Bounds, end?: number): Alignment {
if (typeof(start) !== "number") {
end = start[1];
start = start[0];
}
if (end === undefined) {
end = start;
start = 0;
}
const values: BiIndex[] = [];
for (let i = start; i <= end; ++i) {
values.push([i, i]);
}
return new Alignment(values);
}
/**
* Infer the alignment between two sequences with the lowest edit distance.
*
* Warning: this operation has time complexity ``O(N*M)``, where `N` and `M` are the lengths of the original and
* modified sequences, and so should only be used for relatively short sequences.
*
* @param original
* The original sequence.
* @param modified
* The modified sequence.
* @param costFn
* A function returning the cost of performing an edit. `costFn(a, b)` returns the cost of replacing `a`
* with `b`. `costFn(a, undefined)` returns the cost of deleting `a`, and `costFn(undefined, b)` returns
* the cost of inserting `b`. By default, all operations have cost 1 except replacing identical elements,
* which has cost 0.
* @returns
* The inferred alignment.
*/
static infer<T, U>(original: Iterable<T>, modified: Iterable<U>, costFn?: CostFn<T, U>): Alignment {
if (costFn === undefined) {
costFn = (o, m) => Number(o !== m);
}
let oArray = original instanceof Array ? original : Array.from(original);
let mArray = modified instanceof Array ? modified : Array.from(modified);
if (oArray.length < mArray.length) {
let result = this._inferRecursive(mArray, oArray, (m, o) => costFn!(o, m));
return new Alignment(result).inverse();
} else {
let result = this._inferRecursive(oArray, mArray, costFn);
return new Alignment(result);
}
}
/**
* Hirschberg's algorithm for computing optimal alignments in linear space.
*
* https://en.wikipedia.org/wiki/Hirschberg's_algorithm
*/
private static _inferRecursive<T, U>(original: T[], modified: U[], costFn: CostFn<T, U>): BiIndex[] {
if (original.length <= 1 || modified.length <= 1) {
return this._inferMatrix(original, modified, costFn);
}
const oMid = original.length >> 1;
const oLeft = original.slice(0, oMid);
const oRight = original.slice(oMid);
const lCosts = this._inferCosts(oLeft, modified, costFn);
const oRightRev = oRight.slice();
oRightRev.reverse();
const modifiedRev = modified.slice();
modifiedRev.reverse();
const rCosts = this._inferCosts(oRightRev, modifiedRev, costFn);
rCosts.reverse();
let mMid = -1, best = Infinity;
for (let i = 0; i < lCosts.length; ++i) {
const score = lCosts[i] + rCosts[i];
if (score < best) {
mMid = i;
best = score;
}
}
const mLeft = modified.slice(0, mMid);
const mRight = modified.slice(mMid);
const left = this._inferRecursive(oLeft, mLeft, costFn);
const right = this._inferRecursive(oRight, mRight, costFn);
for (const [o, m] of right) {
left.push([o + oMid, m + mMid]);
}
return left;
}
/**
* The Needleman–Wunsch or Wagner–Fischer algorithm. Here we use it in a way that only computes the final row of
* costs, without finding the alignment itself. Hirschberg's algorithm uses it as a subroutine to find the optimal
* alignment in less than O(N*M) space.
*
* https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm
* https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm
*/
private static _inferCosts<T, U>(original: T[], modified: U[], costFn: CostFn<T, U>): number[] {
let row = [0];
for (let i = 0; i < modified.length; ++i) {
const cost = row[i] + costFn(undefined, modified[i]);
row.push(cost);
}
let prev = Array(row.length);
prev.fill(0);
for (const o of original) {
[prev, row] = [row, prev];
row[0] = prev[0] + costFn(o, undefined);
for (let i = 0; i < modified.length; ++i) {
const m = modified[i];
const subCost = prev[i] + costFn(o, m);
const delCost = prev[i + 1] + costFn(o, undefined);
const insCost = row[i] + costFn(undefined, m);
row[i + 1] = Math.min(subCost, delCost, insCost);
}
}
return row;
}
/**
* The Needleman–Wunsch or Wagner–Fischer algorithm, using the entire matrix to compute the optimal alignment.
*/
private static _inferMatrix<T, U>(original: T[], modified: U[], costFn: CostFn<T, U>): BiIndex[] {
const row = [{cost: 0, i: -1, j: -1}];
for (let j = 0; j < modified.length; ++j) {
const m = modified[j];
row.push({cost: row[j].cost + costFn(undefined, m), i: 0, j: j});
}
const matrix = [row];
for (let i = 0; i < original.length; ++i) {
const o = original[i];
const prev = matrix[i];
const row = [{cost: prev[0].cost + costFn(o, undefined), i: i, j: 0}];
for (let j = 0; j < modified.length; ++j) {
const m = modified[j];
let cost = prev[j].cost + costFn(o, m);
let x = i, y = j;
const delCost = prev[j + 1].cost + costFn(o, undefined);
if (delCost < cost) {
cost = delCost;
x = i;
y = j + 1;
}
const insCost = row[j].cost + costFn(undefined, m);
if (insCost < cost) {
cost = insCost;
x = i + 1;
y = j;
}
row.push({cost: cost, i: x, j: y});
}
matrix.push(row);
}
const result: BiIndex[] = [];
let i = matrix.length - 1;
let j = matrix[i].length - 1;
while (i >= 0) {
result.push([i, j]);
({i, j} = matrix[i][j]);
}
result.reverse();
return result;
}
/**
* Extract a slice of this alignment.
*
* @param start
* The position to start from.
* @param end
* The position to end at.
* @returns
* The requested slice as a new `Alignment`.
*/
slice(start?: number, end?: number): Alignment {
return new Alignment(this.values.slice(start, end));
}
/**
* Binary search for computing corresponding bounds.
*
* @param which
* Which side of the sequence to search (0 for original, 1 for modified).
* @param start
* The start of the span to map.
* @param end
* The end of the span to map.
* @returns
* The indices in `this.values` that contain the given range.
*/
private _search(which: number, start: number, end: number): Bounds {
let first = 0, limit = this.length;
while (first < limit) {
const mid = first + ((limit - first) >> 2);
if (this.values[mid][which] <= start) {
first = mid + 1;
} else {
limit = mid;
}
}
if (first === 0) {
throw new RangeError("Start index too small");
}
--first;
let last = first;
limit = this.length;
while (last < limit) {
const mid = last + ((limit - last) >> 2);
if (this.values[mid][which] < end) {
last = mid + 1;
} else {
limit = mid;
}
}
if (last === this.length) {
throw new RangeError("End index too large");
}
return [first, last];
}
/**
* Shared implementation of `originalBounds()` and `modifiedBounds()`.
*
* @param which
* Which side of the sequence to search (0 for original, 1 for modified).
* @param start
* The start of the span to map.
* @param end
* The end of the span to map.
* @returns
* The corresponding span in the other sequence (`1 - which`).
*/
private _bounds(which: number, start?: number | Bounds, end?: number): Bounds {
if (start === undefined) {
return [
this.values[0][1 - which],
this.values[this.length - 1][1 - which],
];
} else if (typeof(start) !== "number") {
end = start[1];
start = start[0];
}
if (end === undefined) {
end = this.values[this.length - 1][which];
}
const [first, last] = this._search(which, start, end);
return [this.values[first][1 - which], this.values[last][1 - which]];
}
/**
* @returns
* The bounds of the original sequence.
*/
originalBounds(): Bounds;
/**
* Maps a subrange of the modified sequence to the original sequence.
*
* @param start
* The start of the span in the modified sequence.
* @param end
* The end of the span in the modified sequence.
* @returns
* The bounds of the corresponding span in the original sequence.
*/
originalBounds(start: number, end: number): Bounds;
/**
* Maps a subrange of the modified sequence to the original sequence.
*
* @param bounds
* The bounds of the span in the modified sequence.
* @returns
* The bounds of the corresponding span in the original sequence.
*/
originalBounds(bounds: Bounds): Bounds;
originalBounds(start?: number | Bounds, end?: number): Bounds {
return this._bounds(1, start, end);
}
/**
* @returns
* The bounds of the modified sequence.
*/
modifiedBounds(): Bounds;
/**
* Maps a subrange of the original sequence to the modified sequence.
*
* @param start
* The start of the span in the original sequence.
* @param end
* The end of the span in the original sequence.
* @returns
* The bounds of the corresponding span in the modified sequence.
*/
modifiedBounds(start: number, end: number): Bounds;
/**
* Maps a subrange of the original sequence to the modified sequence.
*
* @param bounds
* The bounds of the span in the original sequence.
* @returns
* The bounds of the corresponding span in the modified sequence.
*/
modifiedBounds(bounds: Bounds): Bounds;
modifiedBounds(start?: number | Bounds, end?: number): Bounds {
return this._bounds(0, start, end);
}
/**
* Shared implementation of `sliceByOriginal()` and `sliceByModified()`.
*
* @param which
* Which side of the sequence to slice by (0 for original, 1 for modified).
* @param start
* The start of the span to map.
* @param end
* The end of the span to map.
* @returns
* The requested slice of this alignment.
*/
private _sliceBy(which: number, start: number | Bounds, end?: number): Alignment {
if (typeof(start) !== "number") {
end = start[1];
start = start[0];
}
if (end === undefined) {
end = this.values[this.length - 1][which];
}
const [first, last] = this._search(which, start, end);
const values = this.values.slice(first, last + 1);
for (const i in values) {
const v = values[i].slice() as [number, number];
v[which] = Math.max(start, Math.min(v[which], end));
values[i] = v;
}
return new Alignment(values);
}
/**
* Slice this alignment by a span of the original sequence.
*
* @param start
* The start of the span in the original sequence.
* @param end
* The end of the span in the original sequence.
* @returns
* The requested slice of this alignment.
*/
sliceByOriginal(start: number, end: number): Alignment;
/**
* Slice this alignment by a span of the original sequence.
*
* @param bounds
* The bounds of the span in the original sequence.
* @returns
* The requested slice of this alignment.
*/
sliceByOriginal(bounds: Bounds): Alignment;
sliceByOriginal(start: number | Bounds, end?: number): Alignment {
return this._sliceBy(0, start, end);
}
/**
* Slice this alignment by a span of the modified sequence.
*
* @param start
* The start of the span in the modified sequence.
* @param end
* The end of the span in the modified sequence.
* @returns
* The requested slice of this alignment.
*/
sliceByModified(start: number, end: number): Alignment;
/**
* Slice this alignment by a span of the modified sequence.
*
* @param bounds
* The bounds of the span in the modified sequence.
* @returns
* The requested slice of this alignment.
*/
sliceByModified(bounds: Bounds): Alignment;
sliceByModified(start: number | Bounds, end?: number): Alignment {
return this._sliceBy(1, start, end);
}
/**
* Shift this alignment.
*
* @param deltaO
* The distance to shift the original sequence.
* @param deltaM
* The distance to shift the modified sequence.
* @returns
* An alignment with all the positions shifted by the given amounts.
*/
shift(deltaO: number, deltaM: number): Alignment {
const shifted: BiIndex[] = this.values.map(([o, m]) => [o + deltaO, m + deltaM]);
return new Alignment(shifted);
}
/**
* Concatenate this alignment together with one or more others.
*/
concat(...others: Alignment[]): Alignment {
const values = this.values.slice();
for (const other of others) {
values.push(...other.values);
}
return new Alignment(values);
}
/**
* @returns
* An alignment equivalent to applying `this` first, then `other`.
*/
compose(other: Alignment): Alignment {
const [mf, ml] = this.modifiedBounds();
const [of, ol] = other.originalBounds();
if (mf !== of || ml !== ol) {
throw new RangeError("Incompatible alignments");
}
const values: BiIndex[] = [];
let i = 0, iMax = this.length;
let j = 0, jMax = other.length;
while (i < iMax) {
while (this.values[i][1] > other.values[j][0]) {
++j;
}
while (this.values[i][1] < other.values[j][0] && this.values[i + 1][1] <= other.values[j][0]) {
++i;
}
values.push([this.values[i][0], other.values[j][1]]);
while (i + 1 < iMax && this.values[i][0] === this.values[i + 1][0]) {
++i;
}
let needsUpper = false;
while (j + 1 < jMax && this.values[i][1] >= other.values[j + 1][0]) {
needsUpper = true;
++j;
}
if (needsUpper) {
values.push([this.values[i][0], other.values[j][1]]);
}
++i;
}
return new Alignment(values);
}
/**
* @returns
* The inverse of this alignment, from the modified to the original sequence.
*/
inverse(): Alignment {
return new Alignment(this.values.map(([o, m]) => [m, o]));
}
/**
* @returns
* Whether this alignment is the same as `other`.
*/
equals(other: Alignment): boolean {
if (this.length != other.length) {
return false;
}
for (let i = 0; i < this.length; ++i) {
const [to, tm] = this.values[i];
const [oo, om] = other.values[i];
if (to != oo || tm != om) {
return false;
}
}
return true;
}
}
|
bistring/js/src/alignment.ts/0
|
{
"file_path": "bistring/js/src/alignment.ts",
"repo_id": "bistring",
"token_count": 9453
}
| 359 |
# Using TestPyPI to consume rc builds
The BotBuilder SDK rc build feed is found on [TestPyPI](https://test.pypi.org/).
The daily builds will be available soon through the mentioned feed as well.
# Configure TestPyPI
You can tell pip to download packages from TestPyPI instead of PyPI by specifying the --index-url flag (in the example below, replace 'botbuilder-core' for the name of the library you want to install)
```bash
$ pip install --index-url https://test.pypi.org/simple/ botbuilder-core
```
If you want to allow pip to also pull other packages from PyPI you can specify --extra-index-url to point to PyPI.
This is useful when the package you’re testing has dependencies:
```bash
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ botbuilder-core
```
|
botbuilder-python/UsingTestPyPI.md/0
|
{
"file_path": "botbuilder-python/UsingTestPyPI.md",
"repo_id": "botbuilder-python",
"token_count": 236
}
| 360 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.core import ActivityHandler, ConversationState, UserState, TurnContext
from botbuilder.dialogs import Dialog
from helpers import DialogHelper
class DialogBot(ActivityHandler):
def __init__(
self,
conversation_state: ConversationState,
user_state: UserState,
dialog: Dialog,
):
if conversation_state is None:
raise Exception(
"[DialogBot]: Missing parameter. conversation_state is required"
)
if user_state is None:
raise Exception("[DialogBot]: Missing parameter. user_state is required")
if dialog is None:
raise Exception("[DialogBot]: Missing parameter. dialog is required")
self.conversation_state = conversation_state
self.user_state = user_state
self.dialog = dialog
async def on_turn(self, turn_context: TurnContext):
await super().on_turn(turn_context)
# Save any state changes that might have occurred during the turn.
await self.conversation_state.save_changes(turn_context, False)
await self.user_state.save_changes(turn_context, False)
async def on_message_activity(self, turn_context: TurnContext):
await DialogHelper.run_dialog(
self.dialog,
turn_context,
self.conversation_state.create_property("DialogState"),
)
|
botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/bots/dialog_bot.py/0
|
{
"file_path": "botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/bots/dialog_bot.py",
"repo_id": "botbuilder-python",
"token_count": 558
}
| 361 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.dialogs import (
ComponentDialog,
DialogContext,
DialogTurnResult,
DialogTurnStatus,
)
from botbuilder.schema import ActivityTypes, InputHints
from botbuilder.core import MessageFactory
class CancelAndHelpDialog(ComponentDialog):
async def on_continue_dialog(self, inner_dc: DialogContext) -> DialogTurnResult:
result = await self.interrupt(inner_dc)
if result is not None:
return result
return await super(CancelAndHelpDialog, self).on_continue_dialog(inner_dc)
async def interrupt(self, inner_dc: DialogContext) -> DialogTurnResult:
if inner_dc.context.activity.type == ActivityTypes.message:
text = inner_dc.context.activity.text.lower()
help_message_text = "Show Help..."
help_message = MessageFactory.text(
help_message_text, help_message_text, InputHints.expecting_input
)
if text in ("help", "?"):
await inner_dc.context.send_activity(help_message)
return DialogTurnResult(DialogTurnStatus.Waiting)
cancel_message_text = "Cancelling"
cancel_message = MessageFactory.text(
cancel_message_text, cancel_message_text, InputHints.ignoring_input
)
if text in ("cancel", "quit"):
await inner_dc.context.send_activity(cancel_message)
return await inner_dc.cancel_all_dialogs()
return None
|
botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/dialogs/cancel_and_help_dialog.py/0
|
{
"file_path": "botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/dialogs/cancel_and_help_dialog.py",
"repo_id": "botbuilder-python",
"token_count": 643
}
| 362 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import ABC
from typing import List, Callable, Awaitable
from aiohttp.web_request import Request
from aiohttp.web_response import Response
from botframework.connector.auth import ClaimsIdentity
from botbuilder.core import conversation_reference_extension
from botbuilder.core import BotAdapter, TurnContext
from botbuilder.schema import (
Activity,
ResourceResponse,
ActivityTypes,
ConversationAccount,
ConversationReference,
)
from .activity_resourceresponse import ActivityResourceResponse
from .slack_client import SlackClient
from .slack_helper import SlackHelper
from .slack_adatper_options import SlackAdapterOptions
class SlackAdapter(BotAdapter, ABC):
"""
BotAdapter that can handle incoming Slack events. Incoming Slack events are deserialized to an Activity that is
dispatched through the middleware and bot pipeline.
"""
def __init__(
self,
client: SlackClient,
on_turn_error: Callable[[TurnContext, Exception], Awaitable] = None,
options: SlackAdapterOptions = None,
):
super().__init__(on_turn_error)
self.slack_client = client
self.slack_logged_in = False
self.options = options if options else SlackAdapterOptions()
async def send_activities(
self, context: TurnContext, activities: List[Activity]
) -> List[ResourceResponse]:
"""
Send a message from the bot to the messaging API.
:param context: A TurnContext representing the current incoming message and environment.
:type context: :class:`botbuilder.core.TurnContext`
:param activities: An array of outgoing activities to be sent back to the messaging API.
:type activities: :class:`typing.List[Activity]`
:return: An array of ResourceResponse objects containing the IDs that Slack assigned to the sent messages.
:rtype: :class:`typing.List[ResourceResponse]`
"""
if not context:
raise Exception("TurnContext is required")
if not activities:
raise Exception("List[Activity] is required")
responses = []
for activity in activities:
if activity.type == ActivityTypes.message:
message = SlackHelper.activity_to_slack(activity)
slack_response = await self.slack_client.post_message(message)
if slack_response and slack_response.status_code / 100 == 2:
resource_response = ActivityResourceResponse(
id=slack_response.data["ts"],
activity_id=slack_response.data["ts"],
conversation=ConversationAccount(
id=slack_response.data["channel"]
),
)
responses.append(resource_response)
return responses
async def update_activity(self, context: TurnContext, activity: Activity):
"""
Update a previous message with new content.
:param context: A TurnContext representing the current incoming message and environment.
:type context: :class:`botbuilder.core.TurnContext`
:param activity: The updated activity in the form '{id: `id of activity to update`, ...}'.
:type activity: :class:`botbuilder.schema.Activity`
:return: A resource response with the ID of the updated activity.
:rtype: :class:`botbuilder.schema.ResourceResponse`
"""
if not context:
raise Exception("TurnContext is required")
if not activity:
raise Exception("Activity is required")
if not activity.id:
raise Exception("Activity.id is required")
if not activity.conversation:
raise Exception("Activity.conversation is required")
message = SlackHelper.activity_to_slack(activity)
results = await self.slack_client.chat_update(
ts=message.ts,
channel=message.channel,
text=message.text,
)
if results.status_code / 100 != 2:
raise Exception(f"Error updating activity on slack: {results}")
return ResourceResponse(id=activity.id)
async def delete_activity(
self, context: TurnContext, reference: ConversationReference
):
"""
Delete a previous message.
:param context: A TurnContext representing the current incoming message and environment.
:type context: :class:`botbuilder.core.TurnContext`
:param reference: An object in the form "{activityId: `id of message to delete`,conversation: { id: `id of Slack
channel`}}".
:type reference: :class:`botbuilder.schema.ConversationReference`
"""
if not context:
raise Exception("TurnContext is required")
if not reference:
raise Exception("ConversationReference is required")
if not reference.channel_id:
raise Exception("ConversationReference.channel_id is required")
if not context.activity.timestamp:
raise Exception("Activity.timestamp is required")
await self.slack_client.chat_delete(
channel=reference.conversation.id, ts=reference.activity_id
)
async def continue_conversation(
self,
reference: ConversationReference,
callback: Callable,
bot_id: str = None, # pylint: disable=unused-argument
claims_identity: ClaimsIdentity = None,
audience: str = None, # pylint: disable=unused-argument
):
"""
Send a proactive message to a conversation.
.. remarks::
Most channels require a user to initiate a conversation with a bot before the bot can send activities to the
user.
:param reference: A reference to the conversation to continue.
:type reference: :class:`botbuilder.schema.ConversationReference`
:param callback: The method to call for the resulting bot turn.
:type callback: :class:`typing.Callable`
:param bot_id: Unused for this override.
:type bot_id: str
:param claims_identity: A ClaimsIdentity for the conversation.
:type claims_identity: :class:`botframework.connector.auth.ClaimsIdentity`
:param audience: Unused for this override.
:type audience: str
"""
if not reference:
raise Exception("ConversationReference is required")
if not callback:
raise Exception("callback is required")
if claims_identity:
request = conversation_reference_extension.get_continuation_activity(
reference
)
context = TurnContext(self, request)
context.turn_state[BotAdapter.BOT_IDENTITY_KEY] = claims_identity
context.turn_state[BotAdapter.BOT_CALLBACK_HANDLER_KEY] = callback
else:
request = TurnContext.apply_conversation_reference(
conversation_reference_extension.get_continuation_activity(reference),
reference,
)
context = TurnContext(self, request)
return await self.run_pipeline(context, callback)
async def process(self, req: Request, logic: Callable) -> Response:
"""
Accept an incoming webhook request and convert it into a TurnContext which can be processed by the bot's logic.
:param req: The aiohttp Request object.
:type req: :class:`aiohttp.web_request.Request`
:param logic: The method to call for the resulting bot turn.
:type logic: :class:`tying.Callable`
:return: The aiohttp Response.
:rtype: :class:`aiohttp.web_response.Response`
"""
if not req:
raise Exception("Request is required")
if not self.slack_logged_in:
await self.slack_client.login_with_slack()
self.slack_logged_in = True
body = await req.text()
if (
self.options.verify_incoming_requests
and not self.slack_client.verify_signature(req, body)
):
return SlackHelper.response(
req, 401, "Rejected due to mismatched header signature"
)
slack_body = SlackHelper.deserialize_body(req.content_type, body)
if slack_body.type == "url_verification":
return SlackHelper.response(req, 200, slack_body.challenge)
if (
not self.slack_client.options.slack_verification_token
and slack_body.token != self.slack_client.options.slack_verification_token
):
text = f"Rejected due to mismatched verificationToken:{body}"
return SlackHelper.response(req, 403, text)
if slack_body.payload:
# handle interactive_message callbacks and block_actions
activity = SlackHelper.payload_to_activity(slack_body.payload)
elif slack_body.type == "event_callback":
activity = await SlackHelper.event_to_activity(
slack_body.event, self.slack_client
)
elif slack_body.command:
activity = await SlackHelper.command_to_activity(
slack_body, self.slack_client
)
else:
return SlackHelper.response(
req, 200, f"Unknown Slack event type {slack_body.type}"
)
context = TurnContext(self, activity)
await self.run_pipeline(context, logic)
return SlackHelper.response(req, 200)
|
botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_adapter.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_adapter.py",
"repo_id": "botbuilder-python",
"token_count": 3847
}
| 363 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .luis_application import LuisApplication
from .luis_recognizer_options_v3 import LuisRecognizerOptionsV3
from .luis_prediction_options import LuisPredictionOptions
from .luis_telemetry_constants import LuisTelemetryConstants
from .luis_recognizer import LuisRecognizer
__all__ = [
"LuisApplication",
"LuisRecognizerOptionsV3",
"LuisPredictionOptions",
"LuisRecognizer",
"LuisTelemetryConstants",
]
|
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/__init__.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/__init__.py",
"repo_id": "botbuilder-python",
"token_count": 164
}
| 364 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .. import QnAMakerOptions, QnADialogResponseOptions
class QnAMakerDialogOptions:
"""
Defines Dialog Options for QnAMakerDialog.
"""
def __init__(
self,
options: QnAMakerOptions = None,
response_options: QnADialogResponseOptions = None,
):
self.options = options or QnAMakerOptions()
self.response_options = response_options or QnADialogResponseOptions()
|
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/dialogs/qnamaker_dialog_options.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/dialogs/qnamaker_dialog_options.py",
"repo_id": "botbuilder-python",
"token_count": 185
}
| 365 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
from typing import Dict, List, NamedTuple, Union
from aiohttp import ClientSession, ClientTimeout
from botbuilder.schema import Activity
from botbuilder.core import BotTelemetryClient, NullTelemetryClient, TurnContext
from .models import FeedbackRecord, QueryResult, QueryResults
from .utils import (
ActiveLearningUtils,
GenerateAnswerUtils,
QnATelemetryConstants,
TrainUtils,
)
from .qnamaker_endpoint import QnAMakerEndpoint
from .qnamaker_options import QnAMakerOptions
from .qnamaker_telemetry_client import QnAMakerTelemetryClient
from .. import __title__, __version__
class EventData(NamedTuple):
properties: Dict[str, str]
metrics: Dict[str, float]
class QnAMaker(QnAMakerTelemetryClient):
"""
Class used to query a QnA Maker knowledge base for answers.
"""
def __init__(
self,
endpoint: QnAMakerEndpoint,
options: QnAMakerOptions = None,
http_client: ClientSession = None,
telemetry_client: BotTelemetryClient = None,
log_personal_information: bool = None,
):
super().__init__(log_personal_information, telemetry_client)
if not isinstance(endpoint, QnAMakerEndpoint):
raise TypeError(
"QnAMaker.__init__(): endpoint is not an instance of QnAMakerEndpoint"
)
self._endpoint: str = endpoint
opt = options or QnAMakerOptions()
self._validate_options(opt)
instance_timeout = ClientTimeout(total=opt.timeout / 1000)
self._http_client = http_client or ClientSession(timeout=instance_timeout)
self.telemetry_client: Union[BotTelemetryClient, NullTelemetryClient] = (
telemetry_client or NullTelemetryClient()
)
self.log_personal_information = log_personal_information or False
self._generate_answer_helper = GenerateAnswerUtils(
self.telemetry_client, self._endpoint, options, self._http_client
)
self._active_learning_train_helper = TrainUtils(
self._endpoint, self._http_client
)
async def close(self):
await self._http_client.close()
async def get_answers(
self,
context: TurnContext,
options: QnAMakerOptions = None,
telemetry_properties: Dict[str, str] = None,
telemetry_metrics: Dict[str, int] = None,
) -> [QueryResult]:
"""
Generates answers from the knowledge base.
:return: A list of answers for the user's query, sorted in decreasing order of ranking score.
:rtype: :class:`typing.List[QueryResult]`
"""
result = await self.get_answers_raw(
context, options, telemetry_properties, telemetry_metrics
)
return result.answers
async def get_answers_raw(
self,
context: TurnContext,
options: QnAMakerOptions = None,
telemetry_properties: Dict[str, str] = None,
telemetry_metrics: Dict[str, int] = None,
) -> QueryResults:
"""
Generates raw answers from the knowledge base.
:return: A list of answers for the user's query, sorted in decreasing order of ranking score.
:rtype: :class:`QueryResult`
"""
if not context:
raise TypeError("QnAMaker.get_answers(): context cannot be None.")
if not isinstance(context.activity, Activity):
raise TypeError(
"QnAMaker.get_answers(): TurnContext's activity must be an Activity instance."
)
result = await self._generate_answer_helper.get_answers_raw(context, options)
await self.on_qna_result(
result.answers, context, telemetry_properties, telemetry_metrics
)
return result
def get_low_score_variation(self, query_result: QueryResult) -> List[QueryResult]:
"""
Filters the ambiguous question for active learning.
:param query_result: User query output.
:type query_result: :class:`QueryResult`
:return: Filtered array of ambiguous questions.
:rtype: :class:`typing.List[QueryResult]`
"""
return ActiveLearningUtils.get_low_score_variation(query_result)
async def call_train(self, feedback_records: List[FeedbackRecord]):
"""
Sends feedback to the knowledge base.
:param feedback_records: Feedback records.
:type feedback_records: :class:`typing.List[FeedbackRecord]`
"""
return await self._active_learning_train_helper.call_train(feedback_records)
async def on_qna_result(
self,
query_results: [QueryResult],
turn_context: TurnContext,
telemetry_properties: Dict[str, str] = None,
telemetry_metrics: Dict[str, float] = None,
):
event_data = await self.fill_qna_event(
query_results, turn_context, telemetry_properties, telemetry_metrics
)
# Track the event
self.telemetry_client.track_event(
name=QnATelemetryConstants.qna_message_event,
properties=event_data.properties,
measurements=event_data.metrics,
)
async def fill_qna_event(
self,
query_results: [QueryResult],
turn_context: TurnContext,
telemetry_properties: Dict[str, str] = None,
telemetry_metrics: Dict[str, float] = None,
) -> EventData:
"""
Fills the event properties and metrics for the QnaMessage event for telemetry.
:param query_results: QnA service results.
:type quert_results: :class:`QueryResult`
:param turn_context: Context object containing information for a single turn of conversation with a user.
:type turn_context: :class:`botbuilder.core.TurnContext`
:param telemetry_properties: Properties to add/override for the event.
:type telemetry_properties: :class:`typing.Dict[str, str]`
:param telemetry_metrics: Metrics to add/override for the event.
:type telemetry_metrics: :class:`typing.Dict[str, float]`
:return: Event properties and metrics for the QnaMessage event for telemetry.
:rtype: :class:`EventData`
"""
properties: Dict[str, str] = dict()
metrics: Dict[str, float] = dict()
properties[
QnATelemetryConstants.knowledge_base_id_property
] = self._endpoint.knowledge_base_id
text: str = turn_context.activity.text
user_name: str = turn_context.activity.from_property.name
# Use the LogPersonalInformation flag to toggle logging PII data; text and username are common examples.
if self.log_personal_information:
if text:
properties[QnATelemetryConstants.question_property] = text
if user_name:
properties[QnATelemetryConstants.username_property] = user_name
# Fill in Qna Results (found or not).
if self._has_matched_answer_in_kb(query_results):
query_result = query_results[0]
result_properties = {
QnATelemetryConstants.matched_question_property: json.dumps(
query_result.questions
),
QnATelemetryConstants.question_id_property: str(query_result.id),
QnATelemetryConstants.answer_property: query_result.answer,
QnATelemetryConstants.article_found_property: "true",
}
properties.update(result_properties)
metrics[QnATelemetryConstants.score_metric] = query_result.score
else:
no_match_properties = {
QnATelemetryConstants.matched_question_property: "No Qna Question matched",
QnATelemetryConstants.question_id_property: "No Qna Question Id matched",
QnATelemetryConstants.answer_property: "No Qna Answer matched",
QnATelemetryConstants.article_found_property: "false",
}
properties.update(no_match_properties)
# Additional Properties can override "stock" properties.
if telemetry_properties:
properties.update(telemetry_properties)
# Additional Metrics can override "stock" metrics.
if telemetry_metrics:
metrics.update(telemetry_metrics)
return EventData(properties=properties, metrics=metrics)
def _validate_options(self, options: QnAMakerOptions):
if not options.score_threshold:
options.score_threshold = 0.3
if not options.top:
options.top = 1
if options.score_threshold < 0 or options.score_threshold > 1:
raise ValueError("Score threshold should be a value between 0 and 1")
if options.top < 1:
raise ValueError("QnAMakerOptions.top should be an integer greater than 0")
if not options.strict_filters:
options.strict_filters = []
if not options.timeout:
options.timeout = 100000
def _has_matched_answer_in_kb(self, query_results: [QueryResult]) -> bool:
if query_results:
if query_results[0].id != -1:
return True
return False
|
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py",
"repo_id": "botbuilder-python",
"token_count": 3835
}
| 366 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# pylint: disable=protected-access
import json
from os import path
from typing import Dict, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock
from aiounittest import AsyncTestCase
from msrest import Deserializer
from requests import Session
from requests.models import Response
from botbuilder.ai.luis import LuisApplication, LuisPredictionOptions, LuisRecognizer
from botbuilder.ai.luis.luis_util import LuisUtil
from botbuilder.core import (
BotAdapter,
BotTelemetryClient,
IntentScore,
RecognizerResult,
TurnContext,
)
from botbuilder.core.adapters import TestAdapter
from botbuilder.schema import (
Activity,
ActivityTypes,
ChannelAccount,
ConversationAccount,
)
from null_adapter import NullAdapter
from override_fill_recognizer import OverrideFillRecognizer
from telemetry_override_recognizer import TelemetryOverrideRecognizer
class LuisRecognizerTest(AsyncTestCase):
_luisAppId: str = "b31aeaf3-3511-495b-a07f-571fc873214b"
_subscriptionKey: str = "048ec46dc58e495482b0c447cfdbd291"
_endpoint: str = "https://westus.api.cognitive.microsoft.com"
def __init__(self, *args, **kwargs):
super(LuisRecognizerTest, self).__init__(*args, **kwargs)
self._mocked_results: RecognizerResult = RecognizerResult(
intents={"Test": IntentScore(score=0.2), "Greeting": IntentScore(score=0.4)}
)
self._empty_luis_response: Dict[str, object] = json.loads(
'{ "query": null, "intents": [], "entities": [] }'
)
def test_luis_recognizer_construction(self):
# Arrange
endpoint = (
"https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/"
"b31aeaf3-3511-495b-a07f-571fc873214b?verbose=true&timezoneOffset=-360"
"&subscription-key=048ec46dc58e495482b0c447cfdbd291&q="
)
# Act
recognizer = LuisRecognizer(endpoint)
# Assert
app = recognizer._application
self.assertEqual("b31aeaf3-3511-495b-a07f-571fc873214b", app.application_id)
self.assertEqual("048ec46dc58e495482b0c447cfdbd291", app.endpoint_key)
self.assertEqual("https://westus.api.cognitive.microsoft.com", app.endpoint)
def test_none_endpoint(self):
# Arrange
my_app = LuisApplication(
LuisRecognizerTest._luisAppId,
LuisRecognizerTest._subscriptionKey,
endpoint=None,
)
# Assert
recognizer = LuisRecognizer(my_app, prediction_options=None)
# Assert
app = recognizer._application
self.assertEqual("https://westus.api.cognitive.microsoft.com", app.endpoint)
def test_empty_endpoint(self):
# Arrange
my_app = LuisApplication(
LuisRecognizerTest._luisAppId,
LuisRecognizerTest._subscriptionKey,
endpoint="",
)
# Assert
recognizer = LuisRecognizer(my_app, prediction_options=None)
# Assert
app = recognizer._application
self.assertEqual("https://westus.api.cognitive.microsoft.com", app.endpoint)
def test_luis_recognizer_none_luis_app_arg(self):
with self.assertRaises(TypeError):
LuisRecognizer(application=None)
async def test_single_intent_simply_entity(self):
utterance: str = "My name is Emad"
response_path: str = "SingleIntent_SimplyEntity.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNone(result.altered_text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertEqual(1, len(result.intents))
self.assertIsNotNone(result.intents["SpecifyName"])
self.assert_score(result.intents["SpecifyName"].score)
self.assertIsNotNone(result.entities)
self.assertIsNotNone(result.entities["Name"])
self.assertEqual("emad", result.entities["Name"][0])
self.assertIsNotNone(result.entities["$instance"])
self.assertIsNotNone(result.entities["$instance"]["Name"])
self.assertEqual(11, result.entities["$instance"]["Name"][0]["startIndex"])
self.assertEqual(15, result.entities["$instance"]["Name"][0]["endIndex"])
self.assert_score(result.entities["$instance"]["Name"][0]["score"])
async def test_null_utterance(self):
utterance: str = None
response_path: str = (
"SingleIntent_SimplyEntity.json" # The path is irrelevant in this case
)
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNone(result.altered_text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertEqual(1, len(result.intents))
self.assertIsNotNone(result.intents[""])
self.assertEqual(result.get_top_scoring_intent(), ("", 1.0))
self.assertIsNotNone(result.entities)
self.assertEqual(0, len(result.entities))
async def test_multiple_intents_prebuilt_entity(self):
utterance: str = "Please deliver February 2nd 2001"
response_path: str = "MultipleIntents_PrebuiltEntity.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertTrue(len(result.intents) > 1)
self.assertIsNotNone(result.intents["Delivery"])
self.assertTrue(
result.intents["Delivery"].score > 0
and result.intents["Delivery"].score <= 1
)
self.assertEqual("Delivery", result.get_top_scoring_intent().intent)
self.assertTrue(result.get_top_scoring_intent().score > 0)
self.assertIsNotNone(result.entities)
self.assertIsNotNone(result.entities["number"])
self.assertEqual(2001, int(result.entities["number"][0]))
self.assertIsNotNone(result.entities["ordinal"])
self.assertEqual(2, int(result.entities["ordinal"][0]))
self.assertIsNotNone(result.entities["datetime"][0])
self.assertEqual("2001-02-02", result.entities["datetime"][0]["timex"][0])
self.assertIsNotNone(result.entities["$instance"]["number"])
self.assertEqual(
28, int(result.entities["$instance"]["number"][0]["startIndex"])
)
self.assertEqual(32, int(result.entities["$instance"]["number"][0]["endIndex"]))
self.assertEqual("2001", result.text[28:32])
self.assertIsNotNone(result.entities["$instance"]["datetime"])
self.assertEqual(15, result.entities["$instance"]["datetime"][0]["startIndex"])
self.assertEqual(32, result.entities["$instance"]["datetime"][0]["endIndex"])
self.assertEqual(
"february 2nd 2001", result.entities["$instance"]["datetime"][0]["text"]
)
async def test_multiple_intents_prebuilt_entities_with_multi_values(self):
utterance: str = "Please deliver February 2nd 2001 in room 201"
response_path: str = "MultipleIntents_PrebuiltEntitiesWithMultiValues.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNotNone(result.text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertIsNotNone(result.intents["Delivery"])
self.assertIsNotNone(result.entities)
self.assertIsNotNone(result.entities["number"])
self.assertEqual(2, len(result.entities["number"]))
self.assertTrue(201 in map(int, result.entities["number"]))
self.assertTrue(2001 in map(int, result.entities["number"]))
self.assertIsNotNone(result.entities["datetime"][0])
self.assertEqual("2001-02-02", result.entities["datetime"][0]["timex"][0])
async def test_multiple_intents_list_entity_with_single_value(self):
utterance: str = "I want to travel on united"
response_path: str = "MultipleIntents_ListEntityWithSingleValue.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNotNone(result.text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertIsNotNone(result.intents["Travel"])
self.assertIsNotNone(result.entities)
self.assertIsNotNone(result.entities["Airline"])
self.assertEqual("United", result.entities["Airline"][0][0])
self.assertIsNotNone(result.entities["$instance"])
self.assertIsNotNone(result.entities["$instance"]["Airline"])
self.assertEqual(20, result.entities["$instance"]["Airline"][0]["startIndex"])
self.assertEqual(26, result.entities["$instance"]["Airline"][0]["endIndex"])
self.assertEqual("united", result.entities["$instance"]["Airline"][0]["text"])
async def test_multiple_intents_list_entity_with_multi_values(self):
utterance: str = "I want to travel on DL"
response_path: str = "MultipleIntents_ListEntityWithMultiValues.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNotNone(result.text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertIsNotNone(result.intents["Travel"])
self.assertIsNotNone(result.entities)
self.assertIsNotNone(result.entities["Airline"])
self.assertEqual(2, len(result.entities["Airline"][0]))
self.assertTrue("Delta" in result.entities["Airline"][0])
self.assertTrue("Virgin" in result.entities["Airline"][0])
self.assertIsNotNone(result.entities["$instance"])
self.assertIsNotNone(result.entities["$instance"]["Airline"])
self.assertEqual(20, result.entities["$instance"]["Airline"][0]["startIndex"])
self.assertEqual(22, result.entities["$instance"]["Airline"][0]["endIndex"])
self.assertEqual("dl", result.entities["$instance"]["Airline"][0]["text"])
async def test_multiple_intents_composite_entity_model(self):
utterance: str = "Please deliver it to 98033 WA"
response_path: str = "MultipleIntents_CompositeEntityModel.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result)
self.assertIsNotNone(result.text)
self.assertEqual(utterance, result.text)
self.assertIsNotNone(result.intents)
self.assertIsNotNone(result.intents["Delivery"])
self.assertIsNotNone(result.entities)
self.assertIsNone(result.entities.get("number"))
self.assertIsNone(result.entities.get("State"))
self.assertIsNotNone(result.entities["Address"])
self.assertEqual(98033, result.entities["Address"][0]["number"][0])
self.assertEqual("wa", result.entities["Address"][0]["State"][0])
self.assertIsNotNone(result.entities["$instance"])
self.assertIsNone(result.entities["$instance"].get("number"))
self.assertIsNone(result.entities["$instance"].get("State"))
self.assertIsNotNone(result.entities["$instance"]["Address"])
self.assertEqual(21, result.entities["$instance"]["Address"][0]["startIndex"])
self.assertEqual(29, result.entities["$instance"]["Address"][0]["endIndex"])
self.assert_score(result.entities["$instance"]["Address"][0]["score"])
self.assertIsNotNone(result.entities["Address"][0]["$instance"])
self.assertIsNotNone(result.entities["Address"][0]["$instance"]["number"])
self.assertEqual(
21, result.entities["Address"][0]["$instance"]["number"][0]["startIndex"]
)
self.assertEqual(
26, result.entities["Address"][0]["$instance"]["number"][0]["endIndex"]
)
self.assertEqual(
"98033", result.entities["Address"][0]["$instance"]["number"][0]["text"]
)
self.assertIsNotNone(result.entities["Address"][0]["$instance"]["State"])
self.assertEqual(
27, result.entities["Address"][0]["$instance"]["State"][0]["startIndex"]
)
self.assertEqual(
29, result.entities["Address"][0]["$instance"]["State"][0]["endIndex"]
)
self.assertEqual(
"wa", result.entities["Address"][0]["$instance"]["State"][0]["text"]
)
self.assertEqual("WA", result.text[27:29])
self.assert_score(
result.entities["Address"][0]["$instance"]["State"][0]["score"]
)
async def test_multiple_date_time_entities(self):
utterance: str = "Book a table on Friday or tomorrow at 5 or tomorrow at 4"
response_path: str = "MultipleDateTimeEntities.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result.entities["datetime"])
self.assertEqual(3, len(result.entities["datetime"]))
self.assertEqual(1, len(result.entities["datetime"][0]["timex"]))
self.assertEqual("XXXX-WXX-5", result.entities["datetime"][0]["timex"][0])
self.assertEqual(1, len(result.entities["datetime"][0]["timex"]))
self.assertEqual(2, len(result.entities["datetime"][1]["timex"]))
self.assertEqual(2, len(result.entities["datetime"][2]["timex"]))
self.assertTrue(result.entities["datetime"][1]["timex"][0].endswith("T05"))
self.assertTrue(result.entities["datetime"][1]["timex"][1].endswith("T17"))
self.assertTrue(result.entities["datetime"][2]["timex"][0].endswith("T04"))
self.assertTrue(result.entities["datetime"][2]["timex"][1].endswith("T16"))
self.assertEqual(3, len(result.entities["$instance"]["datetime"]))
async def test_v1_datetime_resolution(self):
utterance: str = "at 4"
response_path: str = "V1DatetimeResolution.json"
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_path
)
self.assertIsNotNone(result.entities["datetime_time"])
self.assertEqual(1, len(result.entities["datetime_time"]))
self.assertEqual("ampm", result.entities["datetime_time"][0]["comment"])
self.assertEqual("T04", result.entities["datetime_time"][0]["time"])
self.assertEqual(1, len(result.entities["$instance"]["datetime_time"]))
async def test_trace_activity(self):
# Arrange
utterance: str = "My name is Emad"
response_path: str = "TraceActivity.json"
# add async support to magic mock.
async def async_magic():
pass
MagicMock.__await__ = lambda x: async_magic().__await__()
# Act
with mock.patch.object(TurnContext, "send_activity") as mock_send_activity:
await LuisRecognizerTest._get_recognizer_result(utterance, response_path)
trace_activity: Activity = mock_send_activity.call_args[0][0]
# Assert
self.assertIsNotNone(trace_activity)
self.assertEqual(LuisRecognizer.luis_trace_type, trace_activity.value_type)
self.assertEqual(LuisRecognizer.luis_trace_label, trace_activity.label)
luis_trace_info = trace_activity.value
self.assertIsNotNone(luis_trace_info)
self.assertIsNotNone(luis_trace_info["recognizerResult"])
self.assertIsNotNone(luis_trace_info["luisResult"])
self.assertIsNotNone(luis_trace_info["luisOptions"])
self.assertIsNotNone(luis_trace_info["luisModel"])
recognizer_result: RecognizerResult = luis_trace_info["recognizerResult"]
self.assertEqual(utterance, recognizer_result["text"])
self.assertIsNotNone(recognizer_result["intents"]["SpecifyName"])
self.assertEqual(utterance, luis_trace_info["luisResult"]["query"])
self.assertEqual(
LuisRecognizerTest._luisAppId, luis_trace_info["luisModel"]["ModelID"]
)
self.assertIsNone(luis_trace_info["luisOptions"]["Staging"])
def test_top_intent_returns_top_intent(self):
greeting_intent: str = LuisRecognizer.top_intent(self._mocked_results)
self.assertEqual(greeting_intent, "Greeting")
def test_top_intent_returns_default_intent_if_min_score_is_higher(self):
default_intent: str = LuisRecognizer.top_intent(
self._mocked_results, min_score=0.5
)
self.assertEqual(default_intent, "None")
def test_top_intent_returns_default_intent_if_provided(self):
default_intent: str = LuisRecognizer.top_intent(
self._mocked_results, "Test2", 0.5
)
self.assertEqual(default_intent, "Test2")
def test_top_intent_throws_type_error_if_results_is_none(self):
none_results: RecognizerResult = None
with self.assertRaises(TypeError):
LuisRecognizer.top_intent(none_results)
def test_top_intent_returns_top_intent_if_score_equals_min_score(self):
default_intent: str = LuisRecognizer.top_intent(
self._mocked_results, min_score=0.4
)
self.assertEqual(default_intent, "Greeting")
def test_telemetry_construction(self):
# Arrange
# Note this is NOT a real LUIS application ID nor a real LUIS subscription-key
# theses are GUIDs edited to look right to the parsing and validation code.
endpoint = (
"https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/"
"b31aeaf3-3511-495b-a07f-571fc873214b?verbose=true&timezoneOffset=-360"
"&subscription-key=048ec46dc58e495482b0c447cfdbd291&q="
)
# Act
recognizer = LuisRecognizer(endpoint)
# Assert
app = recognizer._application
self.assertEqual("b31aeaf3-3511-495b-a07f-571fc873214b", app.application_id)
self.assertEqual("048ec46dc58e495482b0c447cfdbd291", app.endpoint_key)
self.assertEqual("https://westus.api.cognitive.microsoft.com", app.endpoint)
async def test_telemetry_override_on_log_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=False
)
telemetry_properties: Dict[str, str] = {"test": "testvalue", "foo": "foovalue"}
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance,
response_json,
bot_adapter=NullAdapter(),
options=options,
telemetry_properties=telemetry_properties,
)
# Assert
self.assertEqual(1, telemetry_client.track_event.call_count)
args = telemetry_client.track_event.call_args[0]
self.assertEqual("LuisResult", args[0])
self.assertTrue("applicationId" in args[1])
self.assertTrue("intent" in args[1])
self.assertTrue("intentScore" in args[1])
self.assertTrue("fromId" in args[1])
self.assertTrue("entities" in args[1])
async def test_telemetry_pii_logged_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=True
)
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance,
response_json,
bot_adapter=NullAdapter(),
options=options,
telemetry_properties=None,
)
# Assert
self.assertEqual(1, telemetry_client.track_event.call_count)
args = telemetry_client.track_event.call_args[0]
self.assertEqual("LuisResult", args[0])
self.assertEqual(8, len(args[1]))
self.assertTrue("applicationId" in args[1])
self.assertTrue("intent" in args[1])
self.assertTrue("intentScore" in args[1])
self.assertTrue("intent2" in args[1])
self.assertTrue("intentScore2" in args[1])
self.assertTrue("fromId" in args[1])
self.assertTrue("entities" in args[1])
self.assertTrue("question" in args[1])
async def test_telemetry_no_pii_logged_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=False
)
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance,
response_json,
bot_adapter=NullAdapter(),
options=options,
telemetry_properties=None,
)
# Assert
self.assertEqual(1, telemetry_client.track_event.call_count)
args = telemetry_client.track_event.call_args[0]
self.assertEqual("LuisResult", args[0])
self.assertEqual(7, len(args[1]))
self.assertTrue("applicationId" in args[1])
self.assertTrue("intent" in args[1])
self.assertTrue("intentScore" in args[1])
self.assertTrue("intent2" in args[1])
self.assertTrue("intentScore2" in args[1])
self.assertTrue("fromId" in args[1])
self.assertTrue("entities" in args[1])
self.assertFalse("question" in args[1])
async def test_telemetry_override_on_derive_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=False
)
telemetry_properties: Dict[str, str] = {"test": "testvalue", "foo": "foovalue"}
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance,
response_json,
bot_adapter=NullAdapter(),
options=options,
telemetry_properties=telemetry_properties,
recognizer_class=TelemetryOverrideRecognizer,
)
# Assert
self.assertEqual(2, telemetry_client.track_event.call_count)
call0_args = telemetry_client.track_event.call_args_list[0][0]
self.assertEqual("LuisResult", call0_args[0])
self.assertTrue("MyImportantProperty" in call0_args[1])
self.assertTrue(call0_args[1]["MyImportantProperty"] == "myImportantValue")
self.assertTrue("test" in call0_args[1])
self.assertTrue(call0_args[1]["test"] == "testvalue")
self.assertTrue("foo" in call0_args[1])
self.assertTrue(call0_args[1]["foo"] == "foovalue")
call1_args = telemetry_client.track_event.call_args_list[1][0]
self.assertEqual("MySecondEvent", call1_args[0])
self.assertTrue("MyImportantProperty2" in call1_args[1])
self.assertTrue(call1_args[1]["MyImportantProperty2"] == "myImportantValue2")
async def test_telemetry_override_fill_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=False
)
additional_properties: Dict[str, str] = {"test": "testvalue", "foo": "foovalue"}
additional_metrics: Dict[str, str] = {"moo": 3.14159, "boo": 2.11}
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance,
response_json,
bot_adapter=NullAdapter(),
options=options,
telemetry_properties=additional_properties,
telemetry_metrics=additional_metrics,
recognizer_class=OverrideFillRecognizer,
)
# Assert
self.assertEqual(2, telemetry_client.track_event.call_count)
call0_args = telemetry_client.track_event.call_args_list[0][0]
self.assertEqual("LuisResult", call0_args[0])
self.assertTrue("MyImportantProperty" in call0_args[1])
self.assertTrue(call0_args[1]["MyImportantProperty"] == "myImportantValue")
self.assertTrue("test" in call0_args[1])
self.assertTrue(call0_args[1]["test"] == "testvalue")
self.assertTrue("foo" in call0_args[1])
self.assertTrue(call0_args[1]["foo"] == "foovalue")
self.assertTrue("moo" in call0_args[2])
self.assertTrue(call0_args[2]["moo"] == 3.14159)
self.assertTrue("boo" in call0_args[2])
self.assertTrue(call0_args[2]["boo"] == 2.11)
call1_args = telemetry_client.track_event.call_args_list[1][0]
self.assertEqual("MySecondEvent", call1_args[0])
self.assertTrue("MyImportantProperty2" in call1_args[1])
self.assertTrue(call1_args[1]["MyImportantProperty2"] == "myImportantValue2")
async def test_telemetry_no_override_async(self):
# Arrange
utterance: str = "please book from May 5 to June 6"
response_json: Dict[str, object] = self._empty_luis_response
telemetry_client = mock.create_autospec(BotTelemetryClient)
options = LuisPredictionOptions(
telemetry_client=telemetry_client, log_personal_information=False
)
# Act
await LuisRecognizerTest._get_recognizer_result(
utterance, response_json, bot_adapter=NullAdapter(), options=options
)
# Assert
self.assertEqual(1, telemetry_client.track_event.call_count)
call0_args = telemetry_client.track_event.call_args_list[0][0]
self.assertEqual("LuisResult", call0_args[0])
self.assertTrue("intent" in call0_args[1])
self.assertTrue("intentScore" in call0_args[1])
self.assertTrue("fromId" in call0_args[1])
self.assertTrue("entities" in call0_args[1])
def test_pass_luis_prediction_options_to_recognizer(self):
# Arrange
my_app = LuisApplication(
LuisRecognizerTest._luisAppId,
LuisRecognizerTest._subscriptionKey,
endpoint=None,
)
luis_prediction_options = LuisPredictionOptions(
log_personal_information=True,
include_all_intents=True,
include_instance_data=True,
)
# Assert
recognizer = LuisRecognizer(my_app)
merged_options = recognizer._merge_options(luis_prediction_options)
self.assertTrue(merged_options.log_personal_information)
self.assertTrue(merged_options.include_all_intents)
self.assertTrue(merged_options.include_instance_data)
self.assertFalse(recognizer._options.log_personal_information)
self.assertFalse(recognizer._options.include_all_intents)
self.assertFalse(recognizer._options.include_instance_data)
def test_dont_pass_luis_prediction_options_to_recognizer(self):
# Arrange
my_app = LuisApplication(
LuisRecognizerTest._luisAppId,
LuisRecognizerTest._subscriptionKey,
endpoint=None,
)
# Assert
recognizer = LuisRecognizer(my_app)
self.assertFalse(recognizer._options.log_personal_information)
self.assertFalse(recognizer._options.include_all_intents)
self.assertFalse(recognizer._options.include_instance_data)
async def test_composite1(self):
await self._test_json("Composite1.json")
async def test_composite2(self):
await self._test_json("Composite2.json")
async def test_composite3(self):
await self._test_json("Composite3.json")
async def test_prebuilt_domains(self):
await self._test_json("Prebuilt.json")
async def test_patterns(self):
await self._test_json("Patterns.json")
def assert_score(self, score: float) -> None:
self.assertTrue(score >= 0)
self.assertTrue(score <= 1)
async def _test_json(self, response_file: str) -> None:
# Arrange
expected_json = LuisRecognizerTest._get_json_for_file(response_file)
response_json = expected_json["luisResult"]
utterance = expected_json.get("text")
if utterance is None:
utterance = expected_json.get("Text")
options = LuisPredictionOptions(include_all_intents=True)
# Act
_, result = await LuisRecognizerTest._get_recognizer_result(
utterance, response_json, options=options, include_api_results=True
)
# Assert
actual_result_json = LuisUtil.recognizer_result_as_dict(result)
trimmed_expected = LuisRecognizerTest._remove_none_property(expected_json)
trimmed_actual = LuisRecognizerTest._remove_none_property(actual_result_json)
self.assertEqual(trimmed_expected, trimmed_actual)
@staticmethod
def _remove_none_property(dictionary: Dict[str, object]) -> Dict[str, object]:
for key, value in list(dictionary.items()):
if value is None:
del dictionary[key]
elif isinstance(value, dict):
LuisRecognizerTest._remove_none_property(value)
return dictionary
@classmethod
async def _get_recognizer_result(
cls,
utterance: str,
response_json: Union[str, Dict[str, object]],
bot_adapter: BotAdapter = TestAdapter(),
options: LuisPredictionOptions = None,
include_api_results: bool = False,
telemetry_properties: Dict[str, str] = None,
telemetry_metrics: Dict[str, float] = None,
recognizer_class: type = LuisRecognizer,
) -> Tuple[LuisRecognizer, RecognizerResult]:
if isinstance(response_json, str):
response_json = LuisRecognizerTest._get_json_for_file(
response_file=response_json
)
recognizer = LuisRecognizerTest._get_luis_recognizer(
recognizer_class, include_api_results=include_api_results, options=options
)
context = LuisRecognizerTest._get_context(utterance, bot_adapter)
response = Mock(spec=Response)
response.status_code = 200
response.headers = {}
response.reason = ""
with mock.patch.object(Session, "send", return_value=response):
with mock.patch.object(
Deserializer, "_unpack_content", return_value=response_json
):
result = await recognizer.recognize(
context, telemetry_properties, telemetry_metrics
)
return recognizer, result
@classmethod
def _get_json_for_file(cls, response_file: str) -> Dict[str, object]:
curr_dir = path.dirname(path.abspath(__file__))
response_path = path.join(curr_dir, "test_data", response_file)
with open(response_path, "r", encoding="utf-8-sig") as file:
response_str = file.read()
response_json = json.loads(response_str)
return response_json
@classmethod
def _get_luis_recognizer(
cls,
recognizer_class: type,
options: LuisPredictionOptions = None,
include_api_results: bool = False,
) -> LuisRecognizer:
luis_app = LuisApplication(cls._luisAppId, cls._subscriptionKey, cls._endpoint)
return recognizer_class(
luis_app,
prediction_options=options,
include_api_results=include_api_results,
)
@staticmethod
def _get_context(utterance: str, bot_adapter: BotAdapter) -> TurnContext:
activity = Activity(
type=ActivityTypes.message,
text=utterance,
conversation=ConversationAccount(),
recipient=ChannelAccount(),
from_property=ChannelAccount(),
)
return TurnContext(bot_adapter, activity)
|
botbuilder-python/libraries/botbuilder-ai/tests/luis/luis_recognizer_test.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/luis_recognizer_test.py",
"repo_id": "botbuilder-python",
"token_count": 14277
}
| 367 |
{
"answers": [
{
"questions": [
"Where can you find Misty",
"Misty"
],
"answer": "Wherever people are having a swimming good time",
"score": 74.51,
"id": 27,
"source": "Editorial",
"metadata": [
{
"name": "species",
"value": "human"
},
{
"name": "type",
"value": "water"
}
],
"context": {
"isContextOnly": false,
"prompts": []
}
}
],
"activeLearningEnabled": true
}
|
botbuilder-python/libraries/botbuilder-ai/tests/qna/test_data/RetrunsAnswer_WithStrictFilter_And_Operator.json/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-ai/tests/qna/test_data/RetrunsAnswer_WithStrictFilter_And_Operator.json",
"repo_id": "botbuilder-python",
"token_count": 476
}
| 368 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from applicationinsights import logging
from . import common
class LoggingHandler(logging.LoggingHandler):
"""This class is a LoggingHandler that uses the same settings as the Django middleware to configure
the telemetry client. This can be referenced from LOGGING in your Django settings.py file. As an
example, this code would send all Django log messages, WARNING and up, to Application Insights:
.. code:: python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
# The application insights handler is here
'appinsights': {
'class': 'applicationinsights.django.LoggingHandler',
'level': 'WARNING'
}
},
'loggers': {
'django': {
'handlers': ['appinsights'],
'level': 'WARNING',
'propagate': True,
}
}
}
# You will need this anyway if you're using the middleware.
# See the middleware documentation for more information on configuring
# this setting:
APPLICATION_INSIGHTS = {
'ikey': '00000000-0000-0000-0000-000000000000'
}
"""
def __init__(self, *args, **kwargs):
client = common.create_client()
new_kwargs = {}
new_kwargs.update(kwargs)
new_kwargs["telemetry_channel"] = client.channel
super(LoggingHandler, self).__init__(
client.context.instrumentation_key, *args, **new_kwargs
)
|
botbuilder-python/libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/django/logging.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/django/logging.py",
"repo_id": "botbuilder-python",
"token_count": 851
}
| 369 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from azure.core.exceptions import ResourceExistsError
from azure.storage.queue.aio import QueueClient
from jsonpickle import encode
from botbuilder.core import QueueStorage
from botbuilder.schema import Activity
class AzureQueueStorage(QueueStorage):
def __init__(self, queues_storage_connection_string: str, queue_name: str):
if not queues_storage_connection_string:
raise Exception("queues_storage_connection_string cannot be empty.")
if not queue_name:
raise Exception("queue_name cannot be empty.")
self.__queue_client = QueueClient.from_connection_string(
queues_storage_connection_string, queue_name
)
self.__initialized = False
async def _initialize(self):
if self.__initialized is False:
# This should only happen once - assuming this is a singleton.
# There is no `create_queue_if_exists` or `exists` method, so we need to catch the ResourceExistsError.
try:
await self.__queue_client.create_queue()
except ResourceExistsError:
pass
self.__initialized = True
return self.__initialized
async def queue_activity(
self,
activity: Activity,
visibility_timeout: int = None,
time_to_live: int = None,
) -> str:
"""
Enqueues an Activity for later processing. The visibility timeout specifies how long the message should be
visible to Dequeue and Peek operations.
:param activity: The activity to be queued for later processing.
:type activity: :class:`botbuilder.schema.Activity`
:param visibility_timeout: Visibility timeout in seconds. Optional with a default value of 0.
Cannot be larger than 7 days.
:type visibility_timeout: int
:param time_to_live: Specifies the time-to-live interval for the message in seconds.
:type time_to_live: int
:returns: QueueMessage as a JSON string.
:rtype: :class:`azure.storage.queue.QueueMessage`
"""
await self._initialize()
# Encode the activity as a JSON string.
message = encode(activity)
receipt = await self.__queue_client.send_message(
message, visibility_timeout=visibility_timeout, time_to_live=time_to_live
)
# Encode the QueueMessage receipt as a JSON string.
return encode(receipt)
|
botbuilder-python/libraries/botbuilder-azure/botbuilder/azure/azure_queue_storage.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-azure/botbuilder/azure/azure_queue_storage.py",
"repo_id": "botbuilder-python",
"token_count": 958
}
| 370 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .turn_context import TurnContext
from .bot_state import BotState
from .storage import Storage
class ConversationState(BotState):
"""
Defines a state management object for conversation state.
.. remarks::
Conversation state is available in any turn in a specific conversation, regardless of the user, such as
in a group conversation.
"""
no_key_error_message = "ConversationState: channelId and/or conversation missing from context.activity."
def __init__(self, storage: Storage):
"""
Creates a :class:`ConversationState` instance.
Creates a new instance of the :class:`ConversationState` class.
:param storage: The storage containing the conversation state.
:type storage: :class:`Storage`
"""
super(ConversationState, self).__init__(storage, "Internal.ConversationState")
def get_storage_key(self, turn_context: TurnContext) -> object:
"""
Gets the key to use when reading and writing state to and from storage.
:param turn_context: The context object for this turn.
:type turn_context: :class:`TurnContext`
:raise: :class:`TypeError` if the :meth:`TurnContext.activity` for the current turn is missing
:class:`botbuilder.schema.Activity` channelId or conversation information or the conversation's
account id is missing.
:return: The storage key.
:rtype: str
.. remarks::
Conversation state includes the channel ID and conversation ID as part of its storage key.
"""
channel_id = turn_context.activity.channel_id or self.__raise_type_error(
"invalid activity-missing channel_id"
)
conversation_id = (
turn_context.activity.conversation.id
or self.__raise_type_error("invalid activity-missing conversation.id")
)
storage_key = None
if channel_id and conversation_id:
storage_key = "%s/conversations/%s" % (channel_id, conversation_id)
return storage_key
def __raise_type_error(self, err: str = "NoneType found while expecting value"):
"""Raise type error exception
:raises: :class:`TypeError`
"""
raise TypeError(err)
|
botbuilder-python/libraries/botbuilder-core/botbuilder/core/conversation_state.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/conversation_state.py",
"repo_id": "botbuilder-python",
"token_count": 855
}
| 371 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from asyncio import iscoroutinefunction
from abc import ABC, abstractmethod
from typing import Awaitable, Callable
from .turn_context import TurnContext
class Middleware(ABC):
@abstractmethod
async def on_turn(
self, context: TurnContext, logic: Callable[[TurnContext], Awaitable]
):
pass
class AnonymousReceiveMiddleware(Middleware):
def __init__(self, anonymous_handler):
if not iscoroutinefunction(anonymous_handler):
raise TypeError(
"AnonymousReceiveMiddleware must be instantiated with a valid coroutine function."
)
self._to_call = anonymous_handler
def on_turn(self, context: TurnContext, logic: Callable[[TurnContext], Awaitable]):
return self._to_call(context, logic)
class MiddlewareSet(Middleware):
"""
A set of `Middleware` plugins. The set itself is middleware so you can easily package up a set
of middleware that can be composed into a bot with a single `bot.use(mySet)` call or even into
another middleware set using `set.use(mySet)`.
"""
def __init__(self):
super(MiddlewareSet, self).__init__()
self._middleware = []
def use(self, *middleware: Middleware):
"""
Registers middleware plugin(s) with the bot or set.
:param middleware :
:return:
"""
for idx, mid in enumerate(middleware):
if hasattr(mid, "on_turn") and callable(mid.on_turn):
self._middleware.append(mid)
return self
raise TypeError(
'MiddlewareSet.use(): invalid middleware at index "%s" being added.'
% idx
)
async def receive_activity(self, context: TurnContext):
await self.receive_activity_internal(context, None)
async def on_turn(
self, context: TurnContext, logic: Callable[[TurnContext], Awaitable]
):
await self.receive_activity_internal(context, None)
await logic()
async def receive_activity_with_status(
self, context: TurnContext, callback: Callable[[TurnContext], Awaitable]
):
return await self.receive_activity_internal(context, callback)
async def receive_activity_internal(
self,
context: TurnContext,
callback: Callable[[TurnContext], Awaitable],
next_middleware_index: int = 0,
):
if next_middleware_index == len(self._middleware):
if callback is not None:
return await callback(context)
return None
next_middleware = self._middleware[next_middleware_index]
async def call_next_middleware():
return await self.receive_activity_internal(
context, callback, next_middleware_index + 1
)
try:
return await next_middleware.on_turn(context, call_next_middleware)
except Exception as error:
raise error
|
botbuilder-python/libraries/botbuilder-core/botbuilder/core/middleware_set.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/middleware_set.py",
"repo_id": "botbuilder-python",
"token_count": 1213
}
| 372 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from uuid import uuid4
from logging import Logger
from typing import Callable
from botbuilder.core import Bot, BotAdapter, TurnContext
from botbuilder.schema import (
Activity,
ActivityTypes,
ResourceResponse,
CallerIdConstants,
)
from botframework.connector.auth import (
ClaimsIdentity,
JwtTokenValidation,
)
from .skill_conversation_reference import SkillConversationReference
from .conversation_id_factory import ConversationIdFactoryBase
from .skill_handler import SkillHandler
class _SkillHandlerImpl(SkillHandler):
def __init__( # pylint: disable=super-init-not-called
self,
skill_conversation_reference_key: str,
adapter: BotAdapter,
bot: Bot,
conversation_id_factory: ConversationIdFactoryBase,
get_oauth_scope: Callable[[], str],
logger: Logger = None,
):
if not skill_conversation_reference_key:
raise TypeError("skill_conversation_reference_key can't be None")
if not adapter:
raise TypeError("adapter can't be None")
if not bot:
raise TypeError("bot can't be None")
if not conversation_id_factory:
raise TypeError("conversation_id_factory can't be None")
self._skill_conversation_reference_key = skill_conversation_reference_key
self._adapter = adapter
self._bot = bot
self._conversation_id_factory = conversation_id_factory
self._get_oauth_scope = get_oauth_scope or (lambda: "")
self._logger = logger
async def on_send_to_conversation(
self,
claims_identity: ClaimsIdentity,
conversation_id: str,
activity: Activity,
) -> ResourceResponse:
"""
send_to_conversation() API for Skill
This method allows you to send an activity to the end of a conversation.
This is slightly different from ReplyToActivity().
* SendToConversation(conversation_id) - will append the activity to the end
of the conversation according to the timestamp or semantics of the channel.
* ReplyToActivity(conversation_id,ActivityId) - adds the activity as a reply
to another activity, if the channel supports it. If the channel does not
support nested replies, ReplyToActivity falls back to SendToConversation.
Use ReplyToActivity when replying to a specific activity in the
conversation.
Use SendToConversation in all other cases.
:param claims_identity: Claims identity for the bot.
:type claims_identity: :class:`botframework.connector.auth.ClaimsIdentity`
:param conversation_id:The conversation ID.
:type conversation_id: str
:param activity: Activity to send.
:type activity: Activity
:return:
"""
return await self._process_activity(
claims_identity,
conversation_id,
None,
activity,
)
async def on_reply_to_activity(
self,
claims_identity: ClaimsIdentity,
conversation_id: str,
activity_id: str,
activity: Activity,
) -> ResourceResponse:
"""
reply_to_activity() API for Skill.
This method allows you to reply to an activity.
This is slightly different from SendToConversation().
* SendToConversation(conversation_id) - will append the activity to the end
of the conversation according to the timestamp or semantics of the channel.
* ReplyToActivity(conversation_id,ActivityId) - adds the activity as a reply
to another activity, if the channel supports it. If the channel does not
support nested replies, ReplyToActivity falls back to SendToConversation.
Use ReplyToActivity when replying to a specific activity in the
conversation.
Use SendToConversation in all other cases.
:param claims_identity: Claims identity for the bot.
:type claims_identity: :class:`botframework.connector.auth.ClaimsIdentity`
:param conversation_id:The conversation ID.
:type conversation_id: str
:param activity_id: Activity ID to send.
:type activity_id: str
:param activity: Activity to send.
:type activity: Activity
:return:
"""
return await self._process_activity(
claims_identity,
conversation_id,
activity_id,
activity,
)
async def on_delete_activity(
self, claims_identity: ClaimsIdentity, conversation_id: str, activity_id: str
):
skill_conversation_reference = await self._get_skill_conversation_reference(
conversation_id
)
async def callback(turn_context: TurnContext):
turn_context.turn_state[
self.SKILL_CONVERSATION_REFERENCE_KEY
] = skill_conversation_reference
await turn_context.delete_activity(activity_id)
await self._adapter.continue_conversation(
skill_conversation_reference.conversation_reference,
callback,
claims_identity=claims_identity,
audience=skill_conversation_reference.oauth_scope,
)
async def on_update_activity(
self,
claims_identity: ClaimsIdentity,
conversation_id: str,
activity_id: str,
activity: Activity,
) -> ResourceResponse:
skill_conversation_reference = await self._get_skill_conversation_reference(
conversation_id
)
resource_response: ResourceResponse = None
async def callback(turn_context: TurnContext):
nonlocal resource_response
turn_context.turn_state[
self.SKILL_CONVERSATION_REFERENCE_KEY
] = skill_conversation_reference
activity.apply_conversation_reference(
skill_conversation_reference.conversation_reference
)
turn_context.activity.id = activity_id
turn_context.activity.caller_id = (
f"{CallerIdConstants.bot_to_bot_prefix}"
f"{JwtTokenValidation.get_app_id_from_claims(claims_identity.claims)}"
)
resource_response = await turn_context.update_activity(activity)
await self._adapter.continue_conversation(
skill_conversation_reference.conversation_reference,
callback,
claims_identity=claims_identity,
audience=skill_conversation_reference.oauth_scope,
)
return resource_response or ResourceResponse(id=str(uuid4()).replace("-", ""))
@staticmethod
def _apply_skill_activity_to_turn_context_activity(
context: TurnContext, activity: Activity
):
context.activity.type = activity.type
context.activity.text = activity.text
context.activity.code = activity.code
context.activity.name = activity.name
context.activity.relates_to = activity.relates_to
context.activity.reply_to_id = activity.reply_to_id
context.activity.value = activity.value
context.activity.entities = activity.entities
context.activity.locale = activity.locale
context.activity.local_timestamp = activity.local_timestamp
context.activity.timestamp = activity.timestamp
context.activity.channel_data = activity.channel_data
context.activity.additional_properties = activity.additional_properties
async def _process_activity(
self,
claims_identity: ClaimsIdentity,
conversation_id: str,
reply_to_activity_id: str,
activity: Activity,
) -> ResourceResponse:
skill_conversation_reference = await self._get_skill_conversation_reference(
conversation_id
)
# If an activity is sent, return the ResourceResponse
resource_response: ResourceResponse = None
async def callback(context: TurnContext):
nonlocal resource_response
context.turn_state[
SkillHandler.SKILL_CONVERSATION_REFERENCE_KEY
] = skill_conversation_reference
TurnContext.apply_conversation_reference(
activity, skill_conversation_reference.conversation_reference
)
context.activity.id = reply_to_activity_id
app_id = JwtTokenValidation.get_app_id_from_claims(claims_identity.claims)
context.activity.caller_id = (
f"{CallerIdConstants.bot_to_bot_prefix}{app_id}"
)
if activity.type == ActivityTypes.end_of_conversation:
await self._conversation_id_factory.delete_conversation_reference(
conversation_id
)
await self._send_to_bot(activity, context)
elif activity.type == ActivityTypes.event:
await self._send_to_bot(activity, context)
elif activity.type in (ActivityTypes.command, ActivityTypes.command_result):
if activity.name.startswith("application/"):
# Send to channel and capture the resource response for the SendActivityCall so we can return it.
resource_response = await context.send_activity(activity)
else:
await self._send_to_bot(activity, context)
else:
# Capture the resource response for the SendActivityCall so we can return it.
resource_response = await context.send_activity(activity)
await self._adapter.continue_conversation(
skill_conversation_reference.conversation_reference,
callback,
claims_identity=claims_identity,
audience=skill_conversation_reference.oauth_scope,
)
if not resource_response:
resource_response = ResourceResponse(id=str(uuid4()))
return resource_response
async def _get_skill_conversation_reference(
self, conversation_id: str
) -> SkillConversationReference:
# Get the SkillsConversationReference
try:
skill_conversation_reference = (
await self._conversation_id_factory.get_skill_conversation_reference(
conversation_id
)
)
except (NotImplementedError, AttributeError):
if self._logger:
self._logger.log(
30,
"Got NotImplementedError when trying to call get_skill_conversation_reference() "
"on the SkillConversationIdFactory, attempting to use deprecated "
"get_conversation_reference() method instead.",
)
# ConversationIdFactory can return either a SkillConversationReference (the newer way),
# or a ConversationReference (the old way, but still here for compatibility). If a
# ConversationReference is returned, build a new SkillConversationReference to simplify
# the remainder of this method.
conversation_reference_result = (
await self._conversation_id_factory.get_conversation_reference(
conversation_id
)
)
if isinstance(conversation_reference_result, SkillConversationReference):
skill_conversation_reference: SkillConversationReference = (
conversation_reference_result
)
else:
skill_conversation_reference: SkillConversationReference = (
SkillConversationReference(
conversation_reference=conversation_reference_result,
oauth_scope=self._get_oauth_scope(),
)
)
if not skill_conversation_reference:
raise KeyError("SkillConversationReference not found")
if not skill_conversation_reference.conversation_reference:
raise KeyError("conversationReference not found")
return skill_conversation_reference
async def _send_to_bot(self, activity: Activity, context: TurnContext):
_SkillHandlerImpl._apply_skill_activity_to_turn_context_activity(
context, activity
)
await self._bot.on_turn(context)
|
botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/_skill_handler_impl.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/_skill_handler_impl.py",
"repo_id": "botbuilder-python",
"token_count": 5220
}
| 373 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import platform
import traceback
from http import HTTPStatus
from datetime import datetime
from logging import Logger
from json import loads
from typing import Dict, List
from botbuilder.core import Bot
from botbuilder.schema import Activity, Attachment, ResourceResponse
from botframework.streaming import (
RequestHandler,
ReceiveRequest,
ReceiveResponse,
StreamingRequest,
StreamingResponse,
__title__,
__version__,
)
from botframework.streaming.transport import DisconnectedEventArgs
from botframework.streaming.transport.web_socket import WebSocket, WebSocketServer
from .streaming_activity_processor import StreamingActivityProcessor
from .version_info import VersionInfo
class StreamContent:
def __init__(self, stream: List[int], *, headers: Dict[str, str] = None):
self.stream = stream
self.headers: Dict[str, str] = headers if headers is not None else {}
class StreamingRequestHandler(RequestHandler):
def __init__(
self,
bot: Bot,
activity_processor: StreamingActivityProcessor,
web_socket: WebSocket,
logger: Logger = None,
):
if not bot:
raise TypeError(f"'bot: {bot.__class__.__name__}' argument can't be None")
if not activity_processor:
raise TypeError(
f"'activity_processor: {activity_processor.__class__.__name__}' argument can't be None"
)
self._bot = bot
self._activity_processor = activity_processor
self._logger = logger
self._conversations: Dict[str, datetime] = {}
self._user_agent = StreamingRequestHandler._get_user_agent()
self._server = WebSocketServer(web_socket, self)
self._server_is_connected = True
self._server.disconnected_event_handler = self._server_disconnected
self._service_url: str = None
@property
def service_url(self) -> str:
return self._service_url
async def listen(self):
await self._server.start()
# TODO: log it
def has_conversation(self, conversation_id: str) -> bool:
return conversation_id in self._conversations
def conversation_added_time(self, conversation_id: str) -> datetime:
added_time = self._conversations.get(conversation_id)
if not added_time:
added_time = datetime.min
return added_time
def forget_conversation(self, conversation_id: str):
del self._conversations[conversation_id]
async def process_request(
self,
request: ReceiveRequest,
logger: Logger, # pylint: disable=unused-argument
context: object, # pylint: disable=unused-argument
) -> StreamingResponse:
# pylint: disable=pointless-string-statement
response = StreamingResponse()
# We accept all POSTs regardless of path, but anything else requires special treatment.
if not request.verb == StreamingRequest.POST:
return self._handle_custom_paths(request, response)
# Convert the StreamingRequest into an activity the adapter can understand.
try:
body_str = await request.read_body_as_str()
except Exception as error:
traceback.print_exc()
response.status_code = int(HTTPStatus.BAD_REQUEST)
# TODO: log error
return response
try:
# TODO: validate if should use deserialize or from_dict
body_dict = loads(body_str)
activity: Activity = Activity.deserialize(body_dict)
# All activities received by this StreamingRequestHandler will originate from the same channel, but we won't
# know what that channel is until we've received the first request.
if not self.service_url:
self._service_url = activity.service_url
# If this is the first time the handler has seen this conversation it needs to be added to the dictionary so
# the adapter is able to route requests to the correct handler.
if not self.has_conversation(activity.conversation.id):
self._conversations[activity.conversation.id] = datetime.now()
"""
Any content sent as part of a StreamingRequest, including the request body
and inline attachments, appear as streams added to the same collection. The first
stream of any request will be the body, which is parsed and passed into this method
as the first argument, 'body'. Any additional streams are inline attachments that need
to be iterated over and added to the Activity as attachments to be sent to the Bot.
"""
if len(request.streams) > 1:
stream_attachments = [
Attachment(content_type=stream.content_type, content=stream.stream)
for stream in request.streams
]
if activity.attachments:
activity.attachments += stream_attachments
else:
activity.attachments = stream_attachments
# Now that the request has been converted into an activity we can send it to the adapter.
adapter_response = (
await self._activity_processor.process_streaming_activity(
activity, self._bot.on_turn
)
)
# Now we convert the invokeResponse returned by the adapter into a StreamingResponse we can send back
# to the channel.
if not adapter_response:
response.status_code = int(HTTPStatus.OK)
else:
response.status_code = adapter_response.status
if adapter_response.body:
response.set_body(adapter_response.body)
except Exception as error:
traceback.print_exc()
response.status_code = int(HTTPStatus.INTERNAL_SERVER_ERROR)
response.set_body(str(error))
# TODO: log error
return response
async def send_activity(self, activity: Activity) -> ResourceResponse:
if activity.reply_to_id:
request_path = (
f"/v3/conversations/{activity.conversation.id if activity.conversation else ''}/"
f"activities/{activity. reply_to_id}"
)
else:
request_path = f"/v3/conversations/{activity.conversation.id if activity.conversation else ''}/activities"
stream_attachments = self._update_attachment_streams(activity)
request = StreamingRequest.create_post(request_path)
request.set_body(activity)
if stream_attachments:
for attachment in stream_attachments:
# TODO: might be necessary to serialize this before adding
request.add_stream(attachment)
try:
if not self._server_is_connected:
raise Exception(
"Error while attempting to send: Streaming transport is disconnected."
)
server_response = await self._server.send(request)
if server_response.status_code == HTTPStatus.OK:
return server_response.read_body_as_json(ResourceResponse)
except Exception:
# TODO: log error
traceback.print_exc()
return None
async def send_streaming_request(
self, request: StreamingRequest
) -> ReceiveResponse:
try:
if not self._server_is_connected:
raise Exception(
"Error while attempting to send: Streaming transport is disconnected."
)
return await self._server.send(request)
except Exception:
# TODO: remove printing and log it
traceback.print_exc()
return None
@staticmethod
def _get_user_agent() -> str:
package_user_agent = f"{__title__}/{__version__}"
uname = platform.uname()
os_version = f"{uname.machine}-{uname.system}-{uname.version}"
py_version = f"Python,Version={platform.python_version()}"
platform_user_agent = f"({os_version}; {py_version})"
user_agent = f"{package_user_agent} {platform_user_agent}"
return user_agent
def _update_attachment_streams(self, activity: Activity) -> List[object]:
if not activity or not activity.attachments:
return None
def validate_int_list(obj: object) -> bool:
if not isinstance(obj, list):
return False
return all(isinstance(element, int) for element in obj)
stream_attachments = [
attachment
for attachment in activity.attachments
if validate_int_list(attachment.content)
]
if stream_attachments:
activity.attachments = [
attachment
for attachment in activity.attachments
if not validate_int_list(attachment.content)
]
# TODO: validate StreamContent parallel
return [
StreamContent(
attachment.content,
headers={"Content-Type": attachment.content_type},
)
for attachment in stream_attachments
]
return None
def _server_disconnected(
self,
sender: object, # pylint: disable=unused-argument
event: DisconnectedEventArgs, # pylint: disable=unused-argument
):
self._server_is_connected = False
def _handle_custom_paths(
self, request: ReceiveRequest, response: StreamingResponse
) -> StreamingResponse:
if not request or not request.verb or not request.path:
response.status_code = int(HTTPStatus.BAD_REQUEST)
# TODO: log error
return response
if request.verb == StreamingRequest.GET and request.path == "/api/version":
response.status_code = int(HTTPStatus.OK)
response.set_body(VersionInfo(user_agent=self._user_agent))
return response
return None
|
botbuilder-python/libraries/botbuilder-core/botbuilder/core/streaming/streaming_request_handler.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/streaming/streaming_request_handler.py",
"repo_id": "botbuilder-python",
"token_count": 4271
}
| 374 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from copy import copy, deepcopy
from unittest.mock import Mock
import unittest
import uuid
import aiounittest
from botbuilder.core import (
BotFrameworkAdapter,
BotFrameworkAdapterSettings,
TurnContext,
)
from botbuilder.core.invoke_response import InvokeResponse
from botbuilder.schema import (
Activity,
ActivityTypes,
ConversationAccount,
ConversationReference,
ConversationResourceResponse,
ChannelAccount,
DeliveryModes,
ExpectedReplies,
CallerIdConstants,
SignInConstants,
TokenExchangeInvokeRequest,
TokenExchangeInvokeResponse,
)
from botframework.connector.token_api.models import (
TokenExchangeRequest,
TokenResponse as ConnectorTokenResponse,
)
from botframework.connector.aio import ConnectorClient
from botframework.connector.auth import (
ClaimsIdentity,
AuthenticationConstants,
AppCredentials,
CredentialProvider,
SimpleChannelProvider,
GovernmentConstants,
SimpleCredentialProvider,
)
REFERENCE = ConversationReference(
activity_id="1234",
channel_id="test",
locale="en-uS", # Intentionally oddly-cased to check that it isn't defaulted somewhere, but tests stay in English
service_url="https://example.org/channel",
user=ChannelAccount(id="user", name="User Name"),
bot=ChannelAccount(id="bot", name="Bot Name"),
conversation=ConversationAccount(id="convo1"),
)
TEST_ACTIVITY = Activity(text="test", type=ActivityTypes.message)
INCOMING_MESSAGE = TurnContext.apply_conversation_reference(
copy(TEST_ACTIVITY), REFERENCE, True
)
OUTGOING_MESSAGE = TurnContext.apply_conversation_reference(
copy(TEST_ACTIVITY), REFERENCE
)
INCOMING_INVOKE = TurnContext.apply_conversation_reference(
Activity(type=ActivityTypes.invoke), REFERENCE, True
)
class AdapterUnderTest(BotFrameworkAdapter):
def __init__(self, settings=None):
super().__init__(settings)
self.tester = aiounittest.AsyncTestCase()
self.fail_auth = False
self.fail_operation = False
self.expect_auth_header = ""
self.new_service_url = None
self.connector_client_mock = None
def aux_test_authenticate_request(self, request: Activity, auth_header: str):
return super()._authenticate_request(request, auth_header)
async def aux_test_create_connector_client(self, service_url: str):
return await super().create_connector_client(service_url)
async def _authenticate_request(
self, request: Activity, auth_header: str
) -> ClaimsIdentity:
self.tester.assertIsNotNone(
request, "authenticate_request() not passed request."
)
self.tester.assertEqual(
auth_header,
self.expect_auth_header,
"authenticateRequest() not passed expected authHeader.",
)
if self.fail_auth:
raise PermissionError("Unauthorized Access. Request is not authorized")
return ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: self.settings.app_id,
AuthenticationConstants.APP_ID_CLAIM: self.settings.app_id,
},
is_authenticated=True,
)
async def create_connector_client(
self,
service_url: str,
identity: ClaimsIdentity = None, # pylint: disable=unused-argument
audience: str = None, # pylint: disable=unused-argument
) -> ConnectorClient:
return self._get_or_create_connector_client(service_url, None)
def _get_or_create_connector_client(
self, service_url: str, credentials: AppCredentials
) -> ConnectorClient:
self.tester.assertIsNotNone(
service_url, "create_connector_client() not passed service_url."
)
if self.connector_client_mock:
return self.connector_client_mock
self.connector_client_mock = Mock()
async def mock_reply_to_activity(conversation_id, activity_id, activity):
nonlocal self
self.tester.assertIsNotNone(
conversation_id, "reply_to_activity not passed conversation_id"
)
self.tester.assertIsNotNone(
activity_id, "reply_to_activity not passed activity_id"
)
self.tester.assertIsNotNone(
activity, "reply_to_activity not passed activity"
)
return not self.fail_auth
async def mock_send_to_conversation(conversation_id, activity):
nonlocal self
self.tester.assertIsNotNone(
conversation_id, "send_to_conversation not passed conversation_id"
)
self.tester.assertIsNotNone(
activity, "send_to_conversation not passed activity"
)
return not self.fail_auth
async def mock_update_activity(conversation_id, activity_id, activity):
nonlocal self
self.tester.assertIsNotNone(
conversation_id, "update_activity not passed conversation_id"
)
self.tester.assertIsNotNone(
activity_id, "update_activity not passed activity_id"
)
self.tester.assertIsNotNone(activity, "update_activity not passed activity")
return not self.fail_auth
async def mock_delete_activity(conversation_id, activity_id):
nonlocal self
self.tester.assertIsNotNone(
conversation_id, "delete_activity not passed conversation_id"
)
self.tester.assertIsNotNone(
activity_id, "delete_activity not passed activity_id"
)
return not self.fail_auth
async def mock_create_conversation(parameters):
nonlocal self
self.tester.assertIsNotNone(
parameters, "create_conversation not passed parameters"
)
response = ConversationResourceResponse(
activity_id=REFERENCE.activity_id,
service_url=REFERENCE.service_url,
id=uuid.uuid4(),
)
return response
self.connector_client_mock.conversations.reply_to_activity.side_effect = (
mock_reply_to_activity
)
self.connector_client_mock.conversations.send_to_conversation.side_effect = (
mock_send_to_conversation
)
self.connector_client_mock.conversations.update_activity.side_effect = (
mock_update_activity
)
self.connector_client_mock.conversations.delete_activity.side_effect = (
mock_delete_activity
)
self.connector_client_mock.conversations.create_conversation.side_effect = (
mock_create_conversation
)
return self.connector_client_mock
async def _create_token_api_client(
self, context: TurnContext, oauth_app_credentials: AppCredentials = None
):
client = await super()._create_token_api_client(context, oauth_app_credentials)
def mock_exchange_async(
user_id, # pylint: disable=unused-argument
connection_name,
channel_id,
uri=None, # pylint: disable=unused-argument
token=None,
custom_headers=None, # pylint: disable=unused-argument
raw=False, # pylint: disable=unused-argument
**operation_config, # pylint: disable=unused-argument
):
return ConnectorTokenResponse(
channel_id=channel_id,
connection_name=connection_name,
token=token,
expiration=None,
)
client.user_token.exchange_async = mock_exchange_async
return client
async def process_activity(
channel_id: str, channel_data_tenant_id: str, conversation_tenant_id: str
):
activity = None
mock_claims = unittest.mock.create_autospec(ClaimsIdentity)
mock_credential_provider = unittest.mock.create_autospec(
BotFrameworkAdapterSettings
)
sut = BotFrameworkAdapter(mock_credential_provider)
async def aux_func(context):
nonlocal activity
activity = context.Activity
await sut.process_activity(
Activity(
channel_id=channel_id,
service_url="https://smba.trafficmanager.net/amer/",
channel_data={"tenant": {"id": channel_data_tenant_id}},
conversation=ConversationAccount(tenant_id=conversation_tenant_id),
),
mock_claims,
aux_func,
)
return activity
class TestBotFrameworkAdapter(aiounittest.AsyncTestCase):
async def test_should_create_connector_client(self):
adapter = AdapterUnderTest()
client = await adapter.aux_test_create_connector_client(REFERENCE.service_url)
self.assertIsNotNone(client, "client not returned.")
self.assertIsNotNone(client.conversations, "invalid client returned.")
async def test_should_process_activity(self):
called = False
adapter = AdapterUnderTest()
async def aux_func_assert_context(context):
self.assertIsNotNone(context, "context not passed.")
nonlocal called
called = True
await adapter.process_activity(INCOMING_MESSAGE, "", aux_func_assert_context)
self.assertTrue(called, "bot logic not called.")
async def test_should_fail_to_update_activity_if_service_url_missing(self):
adapter = AdapterUnderTest()
context = TurnContext(adapter, INCOMING_MESSAGE)
cpy = deepcopy(INCOMING_MESSAGE)
cpy.service_url = None
with self.assertRaises(Exception) as _:
await adapter.update_activity(context, cpy)
async def test_should_fail_to_update_activity_if_conversation_missing(self):
adapter = AdapterUnderTest()
context = TurnContext(adapter, INCOMING_MESSAGE)
cpy = deepcopy(INCOMING_MESSAGE)
cpy.conversation = None
with self.assertRaises(Exception) as _:
await adapter.update_activity(context, cpy)
async def test_should_fail_to_update_activity_if_activity_id_missing(self):
adapter = AdapterUnderTest()
context = TurnContext(adapter, INCOMING_MESSAGE)
cpy = deepcopy(INCOMING_MESSAGE)
cpy.id = None
with self.assertRaises(Exception) as _:
await adapter.update_activity(context, cpy)
async def test_should_migrate_tenant_id_for_msteams(self):
incoming = TurnContext.apply_conversation_reference(
activity=Activity(
type=ActivityTypes.message,
text="foo",
channel_data={"tenant": {"id": "1234"}},
),
reference=REFERENCE,
is_incoming=True,
)
incoming.channel_id = "msteams"
adapter = AdapterUnderTest()
async def aux_func_assert_tenant_id_copied(context):
self.assertEqual(
context.activity.conversation.tenant_id,
"1234",
"should have copied tenant id from "
"channel_data to conversation address",
)
await adapter.process_activity(incoming, "", aux_func_assert_tenant_id_copied)
async def test_should_create_valid_conversation_for_msteams(self):
tenant_id = "testTenant"
reference = deepcopy(REFERENCE)
reference.conversation.tenant_id = tenant_id
reference.channel_data = {"tenant": {"id": tenant_id}}
adapter = AdapterUnderTest()
called = False
async def aux_func_assert_valid_conversation(context):
self.assertIsNotNone(context, "context not passed")
self.assertIsNotNone(context.activity, "context has no request")
self.assertIsNotNone(
context.activity.conversation, "request has invalid conversation"
)
self.assertEqual(
context.activity.conversation.tenant_id,
tenant_id,
"request has invalid tenant_id on conversation",
)
self.assertEqual(
context.activity.channel_data["tenant"]["tenantId"],
tenant_id,
"request has invalid tenant_id in channel_data",
)
nonlocal called
called = True
await adapter.create_conversation(reference, aux_func_assert_valid_conversation)
self.assertTrue(called, "bot logic not called.")
@staticmethod
def get_creds_and_assert_values(
turn_context: TurnContext,
expected_app_id: str,
expected_scope: str,
creds_count: int,
):
if creds_count > 0:
# pylint: disable=protected-access
credential_cache = turn_context.adapter._app_credential_map
cache_key = BotFrameworkAdapter.key_for_app_credentials(
expected_app_id, expected_scope
)
credentials = credential_cache.get(cache_key)
assert credentials
TestBotFrameworkAdapter.assert_credentials_values(
credentials, expected_app_id, expected_scope
)
if creds_count:
assert creds_count == len(credential_cache)
@staticmethod
def get_client_and_assert_values(
turn_context: TurnContext,
expected_app_id: str,
expected_scope: str,
expected_url: str,
client_count: int,
):
# pylint: disable=protected-access
client_cache = turn_context.adapter._connector_client_cache
cache_key = BotFrameworkAdapter.key_for_connector_client(
expected_url, expected_app_id, expected_scope
)
client = client_cache.get(cache_key)
assert client
TestBotFrameworkAdapter.assert_connectorclient_vaules(
client, expected_app_id, expected_url, expected_scope
)
assert client_count == len(client_cache)
@staticmethod
def assert_connectorclient_vaules(
client: ConnectorClient,
expected_app_id,
expected_service_url: str,
expected_scope=AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
):
creds = client.config.credentials
assert TestBotFrameworkAdapter.__str_equal(
expected_app_id, creds.microsoft_app_id
)
assert TestBotFrameworkAdapter.__str_equal(expected_scope, creds.oauth_scope)
assert TestBotFrameworkAdapter.__str_equal(
expected_service_url, client.config.base_url
)
@staticmethod
def __str_equal(str1: str, str2: str) -> bool:
return (str1 if str1 is not None else "") == (str2 if str2 is not None else "")
@staticmethod
def assert_credentials_values(
credentials: AppCredentials,
expected_app_id: str,
expected_scope: str = AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
):
assert expected_app_id == credentials.microsoft_app_id
assert expected_scope == credentials.oauth_scope
async def test_process_activity_creates_correct_creds_and_client_channel_to_bot(
self,
):
await self.__process_activity_creates_correct_creds_and_client(
None,
None,
None,
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
0,
1,
)
async def test_process_activity_creates_correct_creds_and_client_public_azure(self):
await self.__process_activity_creates_correct_creds_and_client(
"00000000-0000-0000-0000-000000000001",
CallerIdConstants.public_azure_channel,
None,
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
1,
1,
)
async def test_process_activity_creates_correct_creds_and_client_us_gov(self):
await self.__process_activity_creates_correct_creds_and_client(
"00000000-0000-0000-0000-000000000001",
CallerIdConstants.us_gov_channel,
GovernmentConstants.CHANNEL_SERVICE,
GovernmentConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
1,
1,
)
async def __process_activity_creates_correct_creds_and_client(
self,
bot_app_id: str,
expected_caller_id: str,
channel_service: str,
expected_scope: str,
expected_app_credentials_count: int,
expected_client_credentials_count: int,
):
identity = ClaimsIdentity({}, True)
if bot_app_id:
identity.claims = {
AuthenticationConstants.AUDIENCE_CLAIM: bot_app_id,
AuthenticationConstants.APP_ID_CLAIM: bot_app_id,
AuthenticationConstants.VERSION_CLAIM: "1.0",
}
credential_provider = SimpleCredentialProvider(bot_app_id, None)
service_url = "https://smba.trafficmanager.net/amer/"
async def callback(context: TurnContext):
TestBotFrameworkAdapter.get_creds_and_assert_values(
context,
bot_app_id,
expected_scope,
expected_app_credentials_count,
)
TestBotFrameworkAdapter.get_client_and_assert_values(
context,
bot_app_id,
expected_scope,
service_url,
expected_client_credentials_count,
)
assert context.activity.caller_id == expected_caller_id
settings = BotFrameworkAdapterSettings(
bot_app_id,
credential_provider=credential_provider,
channel_provider=SimpleChannelProvider(channel_service),
)
sut = BotFrameworkAdapter(settings)
await sut.process_activity_with_identity(
Activity(
channel_id="emulator",
service_url=service_url,
text="test",
),
identity,
callback,
)
async def test_process_activity_for_forwarded_activity(self):
bot_app_id = "00000000-0000-0000-0000-000000000001"
skill_1_app_id = "00000000-0000-0000-0000-000000skill1"
identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: skill_1_app_id,
AuthenticationConstants.APP_ID_CLAIM: bot_app_id,
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
service_url = "https://root-bot.test.azurewebsites.net/"
async def callback(context: TurnContext):
TestBotFrameworkAdapter.get_creds_and_assert_values(
context,
skill_1_app_id,
bot_app_id,
1,
)
TestBotFrameworkAdapter.get_client_and_assert_values(
context,
skill_1_app_id,
bot_app_id,
service_url,
1,
)
scope = context.turn_state[BotFrameworkAdapter.BOT_OAUTH_SCOPE_KEY]
assert bot_app_id == scope
assert (
context.activity.caller_id
== f"{CallerIdConstants.bot_to_bot_prefix}{bot_app_id}"
)
settings = BotFrameworkAdapterSettings(bot_app_id)
sut = BotFrameworkAdapter(settings)
await sut.process_activity_with_identity(
Activity(
channel_id="emulator",
service_url=service_url,
text="test",
),
identity,
callback,
)
async def test_continue_conversation_without_audience(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id", credential_provider=mock_credential_provider
)
adapter = BotFrameworkAdapter(settings)
skill_1_app_id = "00000000-0000-0000-0000-000000skill1"
skill_2_app_id = "00000000-0000-0000-0000-000000skill2"
skills_identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: skill_1_app_id,
AuthenticationConstants.APP_ID_CLAIM: skill_2_app_id,
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
channel_service_url = "https://smba.trafficmanager.net/amer/"
async def callback(context: TurnContext):
TestBotFrameworkAdapter.get_creds_and_assert_values(
context,
skill_1_app_id,
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
1,
)
TestBotFrameworkAdapter.get_client_and_assert_values(
context,
skill_1_app_id,
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
channel_service_url,
1,
)
# pylint: disable=protected-access
client_cache = context.adapter._connector_client_cache
client = client_cache.get(
BotFrameworkAdapter.key_for_connector_client(
channel_service_url,
skill_1_app_id,
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE,
)
)
assert client
turn_state_client = context.turn_state.get(
BotFrameworkAdapter.BOT_CONNECTOR_CLIENT_KEY
)
assert turn_state_client
client_creds = turn_state_client.config.credentials
assert skill_1_app_id == client_creds.microsoft_app_id
assert (
AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE
== client_creds.oauth_scope
)
assert client.config.base_url == turn_state_client.config.base_url
scope = context.turn_state[BotFrameworkAdapter.BOT_OAUTH_SCOPE_KEY]
assert AuthenticationConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE == scope
refs = ConversationReference(service_url=channel_service_url)
await adapter.continue_conversation(
refs, callback, claims_identity=skills_identity
)
async def test_continue_conversation_with_audience(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id", credential_provider=mock_credential_provider
)
adapter = BotFrameworkAdapter(settings)
skill_1_app_id = "00000000-0000-0000-0000-000000skill1"
skill_2_app_id = "00000000-0000-0000-0000-000000skill2"
skills_identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: skill_1_app_id,
AuthenticationConstants.APP_ID_CLAIM: skill_2_app_id,
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
skill_2_service_url = "https://skill2.com/api/skills/"
async def callback(context: TurnContext):
TestBotFrameworkAdapter.get_creds_and_assert_values(
context,
skill_1_app_id,
skill_2_app_id,
1,
)
TestBotFrameworkAdapter.get_client_and_assert_values(
context,
skill_1_app_id,
skill_2_app_id,
skill_2_service_url,
1,
)
# pylint: disable=protected-access
client_cache = context.adapter._connector_client_cache
client = client_cache.get(
BotFrameworkAdapter.key_for_connector_client(
skill_2_service_url,
skill_1_app_id,
skill_2_app_id,
)
)
assert client
turn_state_client = context.turn_state.get(
BotFrameworkAdapter.BOT_CONNECTOR_CLIENT_KEY
)
assert turn_state_client
client_creds = turn_state_client.config.credentials
assert skill_1_app_id == client_creds.microsoft_app_id
assert skill_2_app_id == client_creds.oauth_scope
assert client.config.base_url == turn_state_client.config.base_url
scope = context.turn_state[BotFrameworkAdapter.BOT_OAUTH_SCOPE_KEY]
assert skill_2_app_id == scope
refs = ConversationReference(service_url=skill_2_service_url)
await adapter.continue_conversation(
refs, callback, claims_identity=skills_identity, audience=skill_2_app_id
)
async def test_delivery_mode_expect_replies(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id", credential_provider=mock_credential_provider
)
adapter = AdapterUnderTest(settings)
async def callback(context: TurnContext):
await context.send_activity("activity 1")
await context.send_activity("activity 2")
await context.send_activity("activity 3")
inbound_activity = Activity(
type=ActivityTypes.message,
channel_id="emulator",
service_url="http://tempuri.org/whatever",
delivery_mode=DeliveryModes.expect_replies,
text="hello world",
)
identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: "bot_id",
AuthenticationConstants.APP_ID_CLAIM: "bot_id",
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
invoke_response = await adapter.process_activity_with_identity(
inbound_activity, identity, callback
)
assert invoke_response
assert invoke_response.status == 200
activities = ExpectedReplies().deserialize(invoke_response.body).activities
assert len(activities) == 3
assert activities[0].text == "activity 1"
assert activities[1].text == "activity 2"
assert activities[2].text == "activity 3"
assert (
adapter.connector_client_mock.conversations.send_to_conversation.call_count
== 0
)
async def test_delivery_mode_normal(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id", credential_provider=mock_credential_provider
)
adapter = AdapterUnderTest(settings)
async def callback(context: TurnContext):
await context.send_activity("activity 1")
await context.send_activity("activity 2")
await context.send_activity("activity 3")
inbound_activity = Activity(
type=ActivityTypes.message,
channel_id="emulator",
service_url="http://tempuri.org/whatever",
delivery_mode=DeliveryModes.normal,
text="hello world",
conversation=ConversationAccount(id="conversationId"),
)
identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: "bot_id",
AuthenticationConstants.APP_ID_CLAIM: "bot_id",
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
invoke_response = await adapter.process_activity_with_identity(
inbound_activity, identity, callback
)
assert not invoke_response
assert (
adapter.connector_client_mock.conversations.send_to_conversation.call_count
== 3
)
async def test_process_activity_with_identity_token_exchange_invoke_response(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id",
credential_provider=mock_credential_provider,
)
adapter = AdapterUnderTest(settings)
identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: "bot_id",
AuthenticationConstants.APP_ID_CLAIM: "bot_id",
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
inbound_activity = Activity(
type=ActivityTypes.invoke,
name=SignInConstants.token_exchange_operation_name,
service_url="http://tempuri.org/whatever",
delivery_mode=DeliveryModes.normal,
conversation=ConversationAccount(id="conversationId"),
value=TokenExchangeInvokeRequest(
id="token_exchange_id",
token="token",
connection_name="connection_name",
),
)
async def callback(context: TurnContext):
activity = Activity(
type=ActivityTypes.invoke_response,
value=InvokeResponse(
status=200,
body=TokenExchangeInvokeResponse(
id=context.activity.value.id,
connection_name=context.activity.value.connection_name,
),
),
)
await context.send_activity(activity)
invoke_response = await adapter.process_activity_with_identity(
inbound_activity,
identity,
callback,
)
assert invoke_response
assert invoke_response.status == 200
assert invoke_response.body.id == inbound_activity.value.id
assert (
invoke_response.body.connection_name
== inbound_activity.value.connection_name
)
async def test_exchange_token_from_credentials(self):
mock_credential_provider = unittest.mock.create_autospec(CredentialProvider)
settings = BotFrameworkAdapterSettings(
app_id="bot_id",
credential_provider=mock_credential_provider,
)
adapter = AdapterUnderTest(settings)
identity = ClaimsIdentity(
claims={
AuthenticationConstants.AUDIENCE_CLAIM: "bot_id",
AuthenticationConstants.APP_ID_CLAIM: "bot_id",
AuthenticationConstants.VERSION_CLAIM: "1.0",
},
is_authenticated=True,
)
inbound_activity = Activity(
type=ActivityTypes.invoke,
name=SignInConstants.token_exchange_operation_name,
service_url="http://tempuri.org/whatever",
conversation=ConversationAccount(id="conversationId"),
value=TokenExchangeInvokeRequest(
id="token_exchange_id",
token="token",
connection_name="connection_name",
),
)
async def callback(context):
result = await adapter.exchange_token_from_credentials(
turn_context=context,
oauth_app_credentials=None,
connection_name=context.activity.value.connection_name,
exchange_request=TokenExchangeRequest(
token=context.activity.value.token, uri=context.activity.service_url
),
user_id="user_id",
)
activity = Activity(
type=ActivityTypes.invoke_response,
value=InvokeResponse(
status=200,
body=TokenExchangeInvokeResponse(
id=context.activity.value.id,
connection_name=result.connection_name,
),
),
)
await context.send_activity(activity)
invoke_response = await adapter.process_activity_with_identity(
inbound_activity,
identity,
callback,
)
assert invoke_response
assert invoke_response.status == 200
assert invoke_response.body.id == inbound_activity.value.id
assert (
invoke_response.body.connection_name
== inbound_activity.value.connection_name
)
|
botbuilder-python/libraries/botbuilder-core/tests/test_bot_framework_adapter.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/tests/test_bot_framework_adapter.py",
"repo_id": "botbuilder-python",
"token_count": 15345
}
| 375 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Callable, List
import aiounittest
from botbuilder.schema import (
Activity,
ActivityTypes,
ChannelAccount,
ConversationAccount,
Entity,
Mention,
ResourceResponse,
)
from botbuilder.core import BotAdapter, MessageFactory, TurnContext
ACTIVITY = Activity(
id="1234",
type="message",
text="test",
from_property=ChannelAccount(id="user", name="User Name"),
recipient=ChannelAccount(id="bot", name="Bot Name"),
conversation=ConversationAccount(id="convo", name="Convo Name"),
channel_id="UnitTest",
locale="en-uS", # Intentionally oddly-cased to check that it isn't defaulted somewhere, but tests stay in English
service_url="https://example.org",
)
class SimpleAdapter(BotAdapter):
async def send_activities(self, context, activities) -> List[ResourceResponse]:
responses = []
assert context is not None
assert activities is not None
assert isinstance(activities, list)
assert activities
for idx, activity in enumerate(activities): # pylint: disable=unused-variable
assert isinstance(activity, Activity)
assert activity.type == "message" or activity.type == ActivityTypes.trace
responses.append(ResourceResponse(id="5678"))
return responses
async def update_activity(self, context, activity):
assert context is not None
assert activity is not None
return ResourceResponse(id=activity.id)
async def delete_activity(self, context, reference):
assert context is not None
assert reference is not None
assert reference.activity_id == ACTIVITY.id
class TestBotContext(aiounittest.AsyncTestCase):
def test_should_create_context_with_request_and_adapter(self):
TurnContext(SimpleAdapter(), ACTIVITY)
def test_should_not_create_context_without_request(self):
try:
TurnContext(SimpleAdapter(), None)
except TypeError:
pass
except Exception as error:
raise error
def test_should_not_create_context_without_adapter(self):
try:
TurnContext(None, ACTIVITY)
except TypeError:
pass
except Exception as error:
raise error
def test_should_create_context_with_older_context(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
TurnContext(context)
def test_copy_to_should_copy_all_references(self):
# pylint: disable=protected-access
old_adapter = SimpleAdapter()
old_activity = Activity(id="2", type="message", text="test copy")
old_context = TurnContext(old_adapter, old_activity)
old_context.responded = True
async def send_activities_handler(context, activities, next_handler):
assert context is not None
assert activities is not None
assert next_handler is not None
await next_handler
async def delete_activity_handler(context, reference, next_handler):
assert context is not None
assert reference is not None
assert next_handler is not None
await next_handler
async def update_activity_handler(context, activity, next_handler):
assert context is not None
assert activity is not None
assert next_handler is not None
await next_handler
old_context.on_send_activities(send_activities_handler)
old_context.on_delete_activity(delete_activity_handler)
old_context.on_update_activity(update_activity_handler)
adapter = SimpleAdapter()
new_context = TurnContext(adapter, ACTIVITY)
assert not new_context._on_send_activities # pylint: disable=protected-access
assert not new_context._on_update_activity # pylint: disable=protected-access
assert not new_context._on_delete_activity # pylint: disable=protected-access
old_context.copy_to(new_context)
assert new_context.adapter == old_adapter
assert new_context.activity == old_activity
assert new_context.responded is True
assert (
len(new_context._on_send_activities) == 1
) # pylint: disable=protected-access
assert (
len(new_context._on_update_activity) == 1
) # pylint: disable=protected-access
assert (
len(new_context._on_delete_activity) == 1
) # pylint: disable=protected-access
def test_responded_should_be_automatically_set_to_false(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
assert context.responded is False
def test_should_be_able_to_set_responded_to_true(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
assert context.responded is False
context.responded = True
assert context.responded
def test_should_not_be_able_to_set_responded_to_false(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
try:
context.responded = False
except ValueError:
pass
except Exception as error:
raise error
async def test_should_call_on_delete_activity_handlers_before_deletion(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
called = False
async def delete_handler(context, reference, next_handler_coroutine):
nonlocal called
called = True
assert reference is not None
assert context is not None
assert reference.activity_id == "1234"
await next_handler_coroutine()
context.on_delete_activity(delete_handler)
await context.delete_activity(ACTIVITY.id)
assert called is True
async def test_should_call_multiple_on_delete_activity_handlers_in_order(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
called_first = False
called_second = False
async def first_delete_handler(context, reference, next_handler_coroutine):
nonlocal called_first, called_second
assert (
called_first is False
), "called_first should not be True before first_delete_handler is called."
called_first = True
assert (
called_second is False
), "Second on_delete_activity handler was called before first."
assert reference is not None
assert context is not None
assert reference.activity_id == "1234"
await next_handler_coroutine()
async def second_delete_handler(context, reference, next_handler_coroutine):
nonlocal called_first, called_second
assert called_first
assert (
called_second is False
), "called_second was set to True before second handler was called."
called_second = True
assert reference is not None
assert context is not None
assert reference.activity_id == "1234"
await next_handler_coroutine()
context.on_delete_activity(first_delete_handler)
context.on_delete_activity(second_delete_handler)
await context.delete_activity(ACTIVITY.id)
assert called_first is True
assert called_second is True
async def test_should_call_send_on_activities_handler_before_send(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
called = False
async def send_handler(context, activities, next_handler_coroutine):
nonlocal called
called = True
assert activities is not None
assert context is not None
assert not activities[0].id
await next_handler_coroutine()
context.on_send_activities(send_handler)
await context.send_activity(ACTIVITY)
assert called is True
async def test_should_call_on_update_activity_handler_before_update(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
called = False
async def update_handler(context, activity, next_handler_coroutine):
nonlocal called
called = True
assert activity is not None
assert context is not None
assert activity.id == "1234"
await next_handler_coroutine()
context.on_update_activity(update_handler)
await context.update_activity(ACTIVITY)
assert called is True
async def test_update_activity_should_apply_conversation_reference(self):
activity_id = "activity ID"
context = TurnContext(SimpleAdapter(), ACTIVITY)
called = False
async def update_handler(context, activity, next_handler_coroutine):
nonlocal called
called = True
assert context is not None
assert activity.id == activity_id
assert activity.conversation.id == ACTIVITY.conversation.id
await next_handler_coroutine()
context.on_update_activity(update_handler)
new_activity = MessageFactory.text("test text")
new_activity.id = activity_id
update_result = await context.update_activity(new_activity)
assert called is True
assert update_result.id == activity_id
def test_get_conversation_reference_should_return_valid_reference(self):
reference = TurnContext.get_conversation_reference(ACTIVITY)
assert reference.activity_id == ACTIVITY.id
assert reference.user == ACTIVITY.from_property
assert reference.bot == ACTIVITY.recipient
assert reference.conversation == ACTIVITY.conversation
assert reference.channel_id == ACTIVITY.channel_id
assert reference.locale == ACTIVITY.locale
assert reference.service_url == ACTIVITY.service_url
def test_apply_conversation_reference_should_return_prepare_reply_when_is_incoming_is_false(
self,
):
reference = TurnContext.get_conversation_reference(ACTIVITY)
reply = TurnContext.apply_conversation_reference(
Activity(type="message", text="reply"), reference
)
assert reply.recipient == ACTIVITY.from_property
assert reply.from_property == ACTIVITY.recipient
assert reply.conversation == ACTIVITY.conversation
assert reply.locale == ACTIVITY.locale
assert reply.service_url == ACTIVITY.service_url
assert reply.channel_id == ACTIVITY.channel_id
def test_apply_conversation_reference_when_is_incoming_is_true_should_not_prepare_a_reply(
self,
):
reference = TurnContext.get_conversation_reference(ACTIVITY)
reply = TurnContext.apply_conversation_reference(
Activity(type="message", text="reply"), reference, True
)
assert reply.recipient == ACTIVITY.recipient
assert reply.from_property == ACTIVITY.from_property
assert reply.conversation == ACTIVITY.conversation
assert reply.locale == ACTIVITY.locale
assert reply.service_url == ACTIVITY.service_url
assert reply.channel_id == ACTIVITY.channel_id
async def test_should_get_conversation_reference_using_get_reply_conversation_reference(
self,
):
context = TurnContext(SimpleAdapter(), ACTIVITY)
reply = await context.send_activity("test")
assert reply.id, "reply has an id"
reference = TurnContext.get_reply_conversation_reference(
context.activity, reply
)
assert reference.activity_id, "reference has an activity id"
assert (
reference.activity_id == reply.id
), "reference id matches outgoing reply id"
def test_should_remove_at_mention_from_activity(self):
activity = Activity(
type="message",
text="<at>TestOAuth619</at> test activity",
recipient=ChannelAccount(id="TestOAuth619"),
entities=[
Entity().deserialize(
Mention(
type="mention",
text="<at>TestOAuth619</at>",
mentioned=ChannelAccount(name="Bot", id="TestOAuth619"),
).serialize()
)
],
)
text = TurnContext.remove_recipient_mention(activity)
assert text == " test activity"
assert activity.text == " test activity"
def test_should_remove_at_mention_with_regex_characters(self):
activity = Activity(
type="message",
text="<at>Test (*.[]$%#^&?)</at> test activity",
recipient=ChannelAccount(id="Test (*.[]$%#^&?)"),
entities=[
Entity().deserialize(
Mention(
type="mention",
text="<at>Test (*.[]$%#^&?)</at>",
mentioned=ChannelAccount(name="Bot", id="Test (*.[]$%#^&?)"),
).serialize()
)
],
)
text = TurnContext.remove_recipient_mention(activity)
assert text == " test activity"
assert activity.text == " test activity"
async def test_should_send_a_trace_activity(self):
context = TurnContext(SimpleAdapter(), ACTIVITY)
called = False
# pylint: disable=unused-argument
async def aux_func(
ctx: TurnContext, activities: List[Activity], next: Callable
):
nonlocal called
called = True
assert isinstance(activities, list), "activities not array."
assert len(activities) == 1, "invalid count of activities."
assert activities[0].type == ActivityTypes.trace, "type wrong."
assert activities[0].name == "name-text", "name wrong."
assert activities[0].value == "value-text", "value worng."
assert activities[0].value_type == "valueType-text", "valeuType wrong."
assert activities[0].label == "label-text", "label wrong."
return []
context.on_send_activities(aux_func)
await context.send_trace_activity(
"name-text", "value-text", "valueType-text", "label-text"
)
assert called
|
botbuilder-python/libraries/botbuilder-core/tests/test_turn_context.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-core/tests/test_turn_context.py",
"repo_id": "botbuilder-python",
"token_count": 5933
}
| 376 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
class FoundChoice:
"""Represents a result from matching user input against a list of choices"""
def __init__(self, value: str, index: int, score: float, synonym: str = None):
"""
Parameters:
----------
value: The value of the choice that was matched.
index: The index of the choice within the list of choices that was searched over.
score: The accuracy with which the synonym matched the specified portion of the utterance.
A value of 1.0 would indicate a perfect match.
synonym: (Optional) The synonym that was matched.
"""
self.value = value
self.index = index
self.score = score
self.synonym = synonym
|
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/found_choice.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/found_choice.py",
"repo_id": "botbuilder-python",
"token_count": 279
}
| 377 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from botbuilder.schema import Activity
from .dialog_turn_result import DialogTurnResult
from .persisted_state import PersistedState
class DialogManagerResult:
def __init__(
self,
turn_result: DialogTurnResult = None,
activities: List[Activity] = None,
persisted_state: PersistedState = None,
):
self.turn_result = turn_result
self.activities = activities
self.persisted_state = persisted_state
|
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_manager_result.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_manager_result.py",
"repo_id": "botbuilder-python",
"token_count": 198
}
| 378 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .alias_path_resolver import AliasPathResolver
class AtAtPathResolver(AliasPathResolver):
def __init__(self):
super().__init__(alias="@@", prefix="turn.recognized.entities.")
|
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/path_resolvers/at_at_path_resolver.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/path_resolvers/at_at_path_resolver.py",
"repo_id": "botbuilder-python",
"token_count": 90
}
| 379 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.dialogs.memory import scope_path
from .memory_scope import MemoryScope
class CaseInsensitiveDict(dict):
# pylint: disable=protected-access
@classmethod
def _k(cls, key):
return key.lower() if isinstance(key, str) else key
def __init__(self, *args, **kwargs):
super(CaseInsensitiveDict, self).__init__(*args, **kwargs)
self._convert_keys()
def __getitem__(self, key):
return super(CaseInsensitiveDict, self).__getitem__(self.__class__._k(key))
def __setitem__(self, key, value):
super(CaseInsensitiveDict, self).__setitem__(self.__class__._k(key), value)
def __delitem__(self, key):
return super(CaseInsensitiveDict, self).__delitem__(self.__class__._k(key))
def __contains__(self, key):
return super(CaseInsensitiveDict, self).__contains__(self.__class__._k(key))
def pop(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).pop(
self.__class__._k(key), *args, **kwargs
)
def get(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).get(
self.__class__._k(key), *args, **kwargs
)
def setdefault(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).setdefault(
self.__class__._k(key), *args, **kwargs
)
def update(self, e=None, **f):
if e is None:
e = {}
super(CaseInsensitiveDict, self).update(self.__class__(e))
super(CaseInsensitiveDict, self).update(self.__class__(**f))
def _convert_keys(self):
for k in list(self.keys()):
val = super(CaseInsensitiveDict, self).pop(k)
self.__setitem__(k, val)
class TurnMemoryScope(MemoryScope):
def __init__(self):
super().__init__(scope_path.TURN, False)
def get_memory(self, dialog_context: "DialogContext") -> object:
if not dialog_context:
raise TypeError(f"Expecting: DialogContext, but received None")
turn_value = dialog_context.context.turn_state.get(scope_path.TURN, None)
if not turn_value:
turn_value = CaseInsensitiveDict()
dialog_context.context.turn_state[scope_path.TURN] = turn_value
return turn_value
def set_memory(self, dialog_context: "DialogContext", memory: object):
if not dialog_context:
raise TypeError(f"Expecting: DialogContext, but received None")
dialog_context.context.turn_state[scope_path.TURN] = memory
|
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py",
"repo_id": "botbuilder-python",
"token_count": 1098
}
| 380 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from recognizers_text import Culture
class PromptCultureModel:
"""
Culture model used in Choice and Confirm Prompts.
"""
def __init__(
self,
locale: str,
separator: str,
inline_or: str,
inline_or_more: str,
yes_in_language: str,
no_in_language: str,
):
"""
:param locale: Culture Model's Locale. Example: "en-US".
:param separator: Culture Model's Inline Separator. Example: ", ".
:param inline_or: Culture Model's Inline Or. Example: " or ".
:param inline_or_more Culture Model's Inline Or More. Example: ", or ".
:param yes_in_language: Equivalent of "Yes" in Culture Model's Language. Example: "Yes".
:param no_in_language: Equivalent of "No" in Culture Model's Language. Example: "No".
"""
self.locale = locale
self.separator = separator
self.inline_or = inline_or
self.inline_or_more = inline_or_more
self.yes_in_language = yes_in_language
self.no_in_language = no_in_language
class PromptCultureModels:
"""
Class container for currently-supported Culture Models in Confirm and Choice Prompt.
"""
Chinese = PromptCultureModel(
locale=Culture.Chinese,
inline_or=" 要么 ",
inline_or_more=", 要么 ",
separator=", ",
no_in_language="不",
yes_in_language="是的",
)
Dutch = PromptCultureModel(
locale=Culture.Dutch,
inline_or=" of ",
inline_or_more=", of ",
separator=", ",
no_in_language="Nee",
yes_in_language="Ja",
)
English = PromptCultureModel(
locale=Culture.English,
inline_or=" or ",
inline_or_more=", or ",
separator=", ",
no_in_language="No",
yes_in_language="Yes",
)
French = PromptCultureModel(
locale=Culture.French,
inline_or=" ou ",
inline_or_more=", ou ",
separator=", ",
no_in_language="Non",
yes_in_language="Oui",
)
German = PromptCultureModel(
# TODO: Replace with Culture.German after Recognizers-Text package updates.
locale="de-de",
inline_or=" oder ",
inline_or_more=", oder ",
separator=", ",
no_in_language="Nein",
yes_in_language="Ja",
)
Italian = PromptCultureModel(
locale=Culture.Italian,
inline_or=" o ",
inline_or_more=" o ",
separator=", ",
no_in_language="No",
yes_in_language="Si",
)
Japanese = PromptCultureModel(
locale=Culture.Japanese,
inline_or=" または ",
inline_or_more="、 または ",
separator="、 ",
no_in_language="いいえ",
yes_in_language="はい",
)
Korean = PromptCultureModel(
locale=Culture.Korean,
inline_or=" 또는 ",
inline_or_more=" 또는 ",
separator=", ",
no_in_language="아니",
yes_in_language="예",
)
Portuguese = PromptCultureModel(
locale=Culture.Portuguese,
inline_or=" ou ",
inline_or_more=", ou ",
separator=", ",
no_in_language="Não",
yes_in_language="Sim",
)
Spanish = PromptCultureModel(
locale=Culture.Spanish,
inline_or=" o ",
inline_or_more=", o ",
separator=", ",
no_in_language="No",
yes_in_language="Sí",
)
Turkish = PromptCultureModel(
locale=Culture.Turkish,
inline_or=" veya ",
inline_or_more=" veya ",
separator=", ",
no_in_language="Hayır",
yes_in_language="Evet",
)
@classmethod
def map_to_nearest_language(cls, culture_code: str) -> str:
"""
Normalize various potential locale strings to a standard.
:param culture_code: Represents locale. Examples: "en-US, en-us, EN".
:return: Normalized locale.
:rtype: str
.. remarks::
In our other SDKs, this method is a copy/paste of the ones from the Recognizers-Text library.
However, that doesn't exist in Python.
"""
if culture_code:
culture_code = culture_code.lower()
supported_culture_codes = cls._get_supported_locales()
if culture_code not in supported_culture_codes:
culture_prefix = culture_code.split("-")[0]
for supported_culture_code in supported_culture_codes:
if supported_culture_code.startswith(culture_prefix):
culture_code = supported_culture_code
return culture_code
@classmethod
def get_supported_cultures(cls) -> List[PromptCultureModel]:
"""
Gets a list of the supported culture models.
"""
return [
cls.Chinese,
cls.German,
cls.Dutch,
cls.English,
cls.French,
cls.Italian,
cls.Japanese,
cls.Korean,
cls.Portuguese,
cls.Spanish,
cls.Turkish,
]
@classmethod
def _get_supported_locales(cls) -> List[str]:
return [c.locale for c in cls.get_supported_cultures()]
|
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/prompt_culture_models.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/prompt_culture_models.py",
"repo_id": "botbuilder-python",
"token_count": 2526
}
| 381 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import unittest
from typing import List, Tuple
from botbuilder.core import BotFrameworkAdapter, TurnContext
from botbuilder.dialogs.choices import Channel
from botbuilder.schema import Activity
from botframework.connector import Channels
class ChannelTest(unittest.TestCase):
def test_supports_suggested_actions(self):
actual = Channel.supports_suggested_actions(Channels.facebook, 5)
self.assertTrue(actual)
def test_supports_suggested_actions_many(self):
supports_suggested_actions_data: List[Tuple[Channels, int, bool]] = [
(Channels.line, 13, True),
(Channels.line, 14, False),
(Channels.skype, 10, True),
(Channels.skype, 11, False),
(Channels.kik, 20, True),
(Channels.kik, 21, False),
(Channels.emulator, 100, True),
(Channels.emulator, 101, False),
]
for channel, button_cnt, expected in supports_suggested_actions_data:
with self.subTest(
channel=channel, button_cnt=button_cnt, expected=expected
):
actual = Channel.supports_suggested_actions(channel, button_cnt)
self.assertEqual(expected, actual)
def test_supports_card_actions_many(self):
supports_card_action_data: List[Tuple[Channels, int, bool]] = [
(Channels.line, 99, True),
(Channels.line, 100, False),
(Channels.slack, 100, True),
(Channels.skype, 3, True),
(Channels.skype, 5, False),
]
for channel, button_cnt, expected in supports_card_action_data:
with self.subTest(
channel=channel, button_cnt=button_cnt, expected=expected
):
actual = Channel.supports_card_actions(channel, button_cnt)
self.assertEqual(expected, actual)
def test_should_return_channel_id_from_context_activity(self):
test_activity = Activity(channel_id=Channels.facebook)
test_context = TurnContext(BotFrameworkAdapter(settings=None), test_activity)
channel_id = Channel.get_channel_id(test_context)
self.assertEqual(Channels.facebook, channel_id)
def test_should_return_empty_from_context_activity_missing_channel(self):
test_activity = Activity(channel_id=None)
test_context = TurnContext(BotFrameworkAdapter(settings=None), test_activity)
channel_id = Channel.get_channel_id(test_context)
self.assertEqual("", channel_id)
|
botbuilder-python/libraries/botbuilder-dialogs/tests/choices/test_channel.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/tests/choices/test_channel.py",
"repo_id": "botbuilder-python",
"token_count": 1103
}
| 382 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Callable
import aiounittest
from recognizers_text import Culture
from botbuilder.dialogs import DialogContext, DialogTurnResult
from botbuilder.dialogs.prompts import (
NumberPrompt,
PromptOptions,
PromptValidatorContext,
)
from botbuilder.core import (
MemoryStorage,
ConversationState,
TurnContext,
MessageFactory,
)
from botbuilder.core.adapters import TestAdapter, TestFlow
from botbuilder.dialogs import DialogSet, DialogTurnStatus
from botbuilder.schema import Activity, ActivityTypes
class NumberPromptMock(NumberPrompt):
def __init__(
self,
dialog_id: str,
validator: Callable[[PromptValidatorContext], bool] = None,
default_locale=None,
):
super().__init__(dialog_id, validator, default_locale)
async def on_prompt_null_context(self, options: PromptOptions):
# Should throw TypeError
await self.on_prompt(
turn_context=None, state=None, options=options, is_retry=False
)
async def on_prompt_null_options(self, dialog_context: DialogContext):
# Should throw TypeError
await self.on_prompt(
dialog_context.context, state=None, options=None, is_retry=False
)
async def on_recognize_null_context(self):
# Should throw TypeError
await self.on_recognize(turn_context=None, state=None, options=None)
class NumberPromptTests(aiounittest.AsyncTestCase):
def test_empty_id_should_fail(self):
# pylint: disable=no-value-for-parameter
empty_id = ""
self.assertRaises(TypeError, lambda: NumberPrompt(empty_id))
def test_none_id_should_fail(self):
# pylint: disable=no-value-for-parameter
self.assertRaises(TypeError, lambda: NumberPrompt(dialog_id=None))
async def test_with_null_turn_context_should_fail(self):
number_prompt_mock = NumberPromptMock("NumberPromptMock")
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Please send a number.")
)
with self.assertRaises(TypeError):
await number_prompt_mock.on_prompt_null_context(options)
async def test_on_prompt_with_null_options_fails(self):
conver_state = ConversationState(MemoryStorage())
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
number_prompt_mock = NumberPromptMock(
dialog_id="NumberPromptMock", validator=None, default_locale=Culture.English
)
dialogs.add(number_prompt_mock)
with self.assertRaises(TypeError):
await number_prompt_mock.on_recognize_null_context()
async def test_number_prompt(self):
# Create new ConversationState with MemoryStorage and register the state as middleware.
conver_state = ConversationState(MemoryStorage())
# Create a DialogState property, DialogSet and register the WaterfallDialog.
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
# Create and add number prompt to DialogSet.
number_prompt = NumberPrompt("NumberPrompt", None, Culture.English)
dialogs.add(number_prompt)
async def exec_test(turn_context: TurnContext) -> None:
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
await dialog_context.begin_dialog(
"NumberPrompt",
PromptOptions(
prompt=MessageFactory.text("Enter quantity of cable")
),
)
else:
if results.status == DialogTurnStatus.Complete:
number_result = results.result
await turn_context.send_activity(
MessageFactory.text(
f"You asked me for '{number_result}' meters of cable."
)
)
await conver_state.save_changes(turn_context)
adapter = TestAdapter(exec_test)
test_flow = TestFlow(None, adapter)
test_flow2 = await test_flow.send("Hello")
test_flow3 = await test_flow2.assert_reply("Enter quantity of cable")
test_flow4 = await test_flow3.send("Give me twenty meters of cable")
await test_flow4.assert_reply("You asked me for '20' meters of cable.")
async def test_number_prompt_retry(self):
async def exec_test(turn_context: TurnContext) -> None:
dialog_context: DialogContext = await dialogs.create_context(turn_context)
results: DialogTurnResult = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Enter a number."),
retry_prompt=Activity(
type=ActivityTypes.message, text="You must enter a number."
),
)
await dialog_context.prompt("NumberPrompt", options)
elif results.status == DialogTurnStatus.Complete:
number_result = results.result
await turn_context.send_activity(
MessageFactory.text(f"Bot received the number '{number_result}'.")
)
await convo_state.save_changes(turn_context)
adapter = TestAdapter(exec_test)
convo_state = ConversationState(MemoryStorage())
dialog_state = convo_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
number_prompt = NumberPrompt(
dialog_id="NumberPrompt", validator=None, default_locale=Culture.English
)
dialogs.add(number_prompt)
step1 = await adapter.send("hello")
step2 = await step1.assert_reply("Enter a number.")
step3 = await step2.send("hello")
step4 = await step3.assert_reply("You must enter a number.")
step5 = await step4.send("64")
await step5.assert_reply("Bot received the number '64'.")
async def test_number_uses_locale_specified_in_constructor(self):
# Create new ConversationState with MemoryStorage and register the state as middleware.
conver_state = ConversationState(MemoryStorage())
# Create a DialogState property, DialogSet and register the WaterfallDialog.
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
# Create and add number prompt to DialogSet.
number_prompt = NumberPrompt(
"NumberPrompt", None, default_locale=Culture.Spanish
)
dialogs.add(number_prompt)
async def exec_test(turn_context: TurnContext) -> None:
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
await dialog_context.begin_dialog(
"NumberPrompt",
PromptOptions(
prompt=MessageFactory.text(
"How much money is in your gaming account?"
)
),
)
else:
if results.status == DialogTurnStatus.Complete:
number_result = results.result
await turn_context.send_activity(
MessageFactory.text(
f"You say you have ${number_result} in your gaming account."
)
)
await conver_state.save_changes(turn_context)
adapter = TestAdapter(exec_test)
test_flow = TestFlow(None, adapter)
test_flow2 = await test_flow.send("Hello")
test_flow3 = await test_flow2.assert_reply(
"How much money is in your gaming account?"
)
test_flow4 = await test_flow3.send("I've got $1.200.555,42 in my account.")
await test_flow4.assert_reply(
"You say you have $1200555.42 in your gaming account."
)
async def test_number_prompt_validator(self):
async def exec_test(turn_context: TurnContext) -> None:
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Enter a number."),
retry_prompt=Activity(
type=ActivityTypes.message,
text="You must enter a positive number less than 100.",
),
)
await dialog_context.prompt("NumberPrompt", options)
elif results.status == DialogTurnStatus.Complete:
number_result = int(results.result)
await turn_context.send_activity(
MessageFactory.text(f"Bot received the number '{number_result}'.")
)
await conver_state.save_changes(turn_context)
# Create new ConversationState with MemoryStorage and register the state as middleware.
conver_state = ConversationState(MemoryStorage())
# Create a DialogState property, DialogSet and register the WaterfallDialog.
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
# Create and add number prompt to DialogSet.
async def validator(prompt_context: PromptValidatorContext):
result = prompt_context.recognized.value
if 0 < result < 100:
return True
return False
number_prompt = NumberPrompt(
"NumberPrompt", validator, default_locale=Culture.English
)
dialogs.add(number_prompt)
adapter = TestAdapter(exec_test)
step1 = await adapter.send("hello")
step2 = await step1.assert_reply("Enter a number.")
step3 = await step2.send("150")
step4 = await step3.assert_reply(
"You must enter a positive number less than 100."
)
step5 = await step4.send("64")
await step5.assert_reply("Bot received the number '64'.")
async def test_float_number_prompt(self):
async def exec_test(turn_context: TurnContext) -> None:
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Enter a number.")
)
await dialog_context.prompt("NumberPrompt", options)
elif results.status == DialogTurnStatus.Complete:
number_result = float(results.result)
await turn_context.send_activity(
MessageFactory.text(f"Bot received the number '{number_result}'.")
)
await conver_state.save_changes(turn_context)
# Create new ConversationState with MemoryStorage and register the state as middleware.
conver_state = ConversationState(MemoryStorage())
# Create a DialogState property, DialogSet and register the WaterfallDialog.
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
# Create and add number prompt to DialogSet.
number_prompt = NumberPrompt(
"NumberPrompt", validator=None, default_locale=Culture.English
)
dialogs.add(number_prompt)
adapter = TestAdapter(exec_test)
step1 = await adapter.send("hello")
step2 = await step1.assert_reply("Enter a number.")
step3 = await step2.send("3.14")
await step3.assert_reply("Bot received the number '3.14'.")
async def test_number_prompt_uses_locale_specified_in_activity(self):
async def exec_test(turn_context: TurnContext):
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Enter a number.")
)
await dialog_context.prompt("NumberPrompt", options)
elif results.status == DialogTurnStatus.Complete:
number_result = float(results.result)
self.assertEqual(3.14, number_result)
await conver_state.save_changes(turn_context)
conver_state = ConversationState(MemoryStorage())
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
number_prompt = NumberPrompt("NumberPrompt", None, None)
dialogs.add(number_prompt)
adapter = TestAdapter(exec_test)
step1 = await adapter.send("hello")
step2 = await step1.assert_reply("Enter a number.")
await step2.send(
Activity(type=ActivityTypes.message, text="3,14", locale=Culture.Spanish)
)
async def test_number_prompt_defaults_to_en_us_culture(self):
async def exec_test(turn_context: TurnContext):
dialog_context = await dialogs.create_context(turn_context)
results = await dialog_context.continue_dialog()
if results.status == DialogTurnStatus.Empty:
options = PromptOptions(
prompt=Activity(type=ActivityTypes.message, text="Enter a number.")
)
await dialog_context.prompt("NumberPrompt", options)
elif results.status == DialogTurnStatus.Complete:
number_result = float(results.result)
await turn_context.send_activity(
MessageFactory.text(f"Bot received the number '{number_result}'.")
)
await conver_state.save_changes(turn_context)
conver_state = ConversationState(MemoryStorage())
dialog_state = conver_state.create_property("dialogState")
dialogs = DialogSet(dialog_state)
number_prompt = NumberPrompt("NumberPrompt")
dialogs.add(number_prompt)
adapter = TestAdapter(exec_test)
step1 = await adapter.send("hello")
step2 = await step1.assert_reply("Enter a number.")
step3 = await step2.send("3.14")
await step3.assert_reply("Bot received the number '3.14'.")
|
botbuilder-python/libraries/botbuilder-dialogs/tests/test_number_prompt.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/tests/test_number_prompt.py",
"repo_id": "botbuilder-python",
"token_count": 6455
}
| 383 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from logging import Logger
from typing import Any
from botframework.connector.auth import PasswordServiceClientCredentialFactory
class ConfigurationServiceClientCredentialFactory(
PasswordServiceClientCredentialFactory
):
def __init__(self, configuration: Any, *, logger: Logger = None) -> None:
app_type = (
configuration.APP_TYPE
if hasattr(configuration, "APP_TYPE")
else "MultiTenant"
)
app_id = configuration.APP_ID if hasattr(configuration, "APP_ID") else None
app_password = (
configuration.APP_PASSWORD
if hasattr(configuration, "APP_PASSWORD")
else None
)
app_tenantid = None
if app_type == "UserAssignedMsi":
raise Exception("UserAssignedMsi APP_TYPE is not supported")
if app_type == "SingleTenant":
app_tenantid = (
configuration.APP_TENANTID
if hasattr(configuration, "APP_TENANTID")
else None
)
if not app_id:
raise Exception("Property 'APP_ID' is expected in configuration object")
if not app_password:
raise Exception(
"Property 'APP_PASSWORD' is expected in configuration object"
)
if not app_tenantid:
raise Exception(
"Property 'APP_TENANTID' is expected in configuration object"
)
super().__init__(app_id, app_password, app_tenantid, logger=logger)
|
botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/configuration_service_client_credential_factory.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/configuration_service_client_credential_factory.py",
"repo_id": "botbuilder-python",
"token_count": 743
}
| 384 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
from setuptools import setup
REQUIRES = [
"applicationinsights>=0.11.9",
"aiohttp==3.9.3",
"botbuilder-schema==4.16.0",
"botframework-connector==4.16.0",
"botbuilder-core==4.16.0",
"botbuilder-applicationinsights==4.16.0",
]
TESTS_REQUIRES = [
"aiounittest==1.3.0",
]
root = os.path.abspath(os.path.dirname(__file__))
with open(
os.path.join(
root, "botbuilder", "integration", "applicationinsights", "aiohttp", "about.py"
)
) as f:
package_info = {}
info = f.read()
exec(info, package_info)
with open(os.path.join(root, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
setup(
name=package_info["__title__"],
version=package_info["__version__"],
url=package_info["__uri__"],
author=package_info["__author__"],
description=package_info["__description__"],
keywords=[
"BotBuilderApplicationInsights",
"bots",
"ai",
"botframework",
"botbuilder",
"aiohttp",
],
long_description=long_description,
long_description_content_type="text/x-rst",
license=package_info["__license__"],
packages=["botbuilder.integration.applicationinsights.aiohttp"],
install_requires=REQUIRES + TESTS_REQUIRES,
tests_require=TESTS_REQUIRES,
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3.7",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
)
|
botbuilder-python/libraries/botbuilder-integration-applicationinsights-aiohttp/setup.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-integration-applicationinsights-aiohttp/setup.py",
"repo_id": "botbuilder-python",
"token_count": 721
}
| 385 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
from setuptools import setup
NAME = "botbuilder-schema"
VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.16.0"
REQUIRES = ["msrest== 0.7.*", "urllib3<2.0.0"]
root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(root, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
setup(
name=NAME,
version=VERSION,
description="BotBuilder Schema",
author="Microsoft",
url="https://github.com/Microsoft/botbuilder-python",
keywords=["BotBuilderSchema", "bots", "ai", "botframework", "botbuilder"],
long_description=long_description,
long_description_content_type="text/x-rst",
license="MIT",
install_requires=REQUIRES,
packages=[
"botbuilder.schema",
"botbuilder.schema.teams",
],
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3.7",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
)
|
botbuilder-python/libraries/botbuilder-schema/setup.py/0
|
{
"file_path": "botbuilder-python/libraries/botbuilder-schema/setup.py",
"repo_id": "botbuilder-python",
"token_count": 477
}
| 386 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from msrest import Configuration
from .version import VERSION
class ConnectorClientConfiguration(Configuration):
"""Configuration for ConnectorClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
:param str base_url: Service URL
"""
def __init__(self, credentials, base_url=None):
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = "https://api.botframework.com"
super(ConnectorClientConfiguration, self).__init__(base_url)
# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True
self.add_user_agent("botframework-connector/{}".format(VERSION))
self.credentials = credentials
|
botbuilder-python/libraries/botframework-connector/botframework/connector/_configuration.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/_configuration.py",
"repo_id": "botbuilder-python",
"token_count": 366
}
| 387 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from logging import Logger
from typing import Dict, Optional
from botbuilder.schema import Activity, RoleTypes
from ..bot_framework_sdk_client_async import BotFrameworkConnectorConfiguration
from ..http_client_factory import HttpClientFactory
from ..channels import Channels
from ..skills.bot_framework_client import BotFrameworkClient
from .bot_framework_authentication import BotFrameworkAuthentication
from .claims_identity import ClaimsIdentity
from .user_token_client import UserTokenClient
from .connector_factory import ConnectorFactory
from .authenticate_request_result import AuthenticateRequestResult
from .service_client_credentials_factory import ServiceClientCredentialsFactory
from .authentication_configuration import AuthenticationConfiguration
from .verify_options import VerifyOptions
from .jwt_token_validation import JwtTokenValidation
from .skill_validation import SkillValidation
from .authentication_constants import AuthenticationConstants
from .emulator_validation import EmulatorValidation
from .jwt_token_extractor import JwtTokenExtractor
from ._bot_framework_client_impl import _BotFrameworkClientImpl
from ._built_in_bot_framework_authentication import _BuiltinBotFrameworkAuthentication
from ._user_token_client_impl import _UserTokenClientImpl
from ._connector_factory_impl import _ConnectorFactoryImpl
class _ParameterizedBotFrameworkAuthentication(BotFrameworkAuthentication):
def __init__(
self,
validate_authority: bool,
to_channel_from_bot_login_url: str,
to_channel_from_bot_oauth_scope: str,
to_bot_from_channel_token_issuer: str,
oauth_url: str,
to_bot_from_channel_open_id_metadata_url: str,
to_bot_from_emulator_open_id_metadata_url: str,
caller_id: str,
credentials_factory: ServiceClientCredentialsFactory,
auth_configuration: AuthenticationConfiguration,
http_client_factory: HttpClientFactory,
connector_client_configuration: BotFrameworkConnectorConfiguration = None,
logger: Logger = None,
):
self._validate_authority = validate_authority
self._to_channel_from_bot_login_url = to_channel_from_bot_login_url
self._to_channel_from_bot_oauth_scope = to_channel_from_bot_oauth_scope
self._to_bot_from_channel_token_issuer = to_bot_from_channel_token_issuer
self._oauth_url = oauth_url
self._to_bot_from_channel_open_id_metadata_url = (
to_bot_from_channel_open_id_metadata_url
)
self._to_bot_from_emulator_open_id_metadata_url = (
to_bot_from_emulator_open_id_metadata_url
)
self._caller_id = caller_id
self._credentials_factory = credentials_factory
self._auth_configuration = auth_configuration
self._http_client_factory = http_client_factory
self._connector_client_configuration = connector_client_configuration
self._logger = logger
async def authenticate_request(
self, activity: Activity, auth_header: str
) -> AuthenticateRequestResult:
claims_identity = await self._jwt_token_validation_authenticate_request(
activity, auth_header
)
outbound_audience = (
JwtTokenValidation.get_app_id_from_claims(claims_identity.claims)
if SkillValidation.is_skill_claim(claims_identity.claims)
else self._to_channel_from_bot_oauth_scope
)
caller_id = await self.generate_caller_id(
credential_factory=self._credentials_factory,
claims_identity=claims_identity,
caller_id=self._caller_id,
)
connector_factory = _ConnectorFactoryImpl(
app_id=_BuiltinBotFrameworkAuthentication.get_app_id(claims_identity),
to_channel_from_bot_oauth_scope=self._to_channel_from_bot_oauth_scope,
login_endpoint=self._to_channel_from_bot_login_url,
validate_authority=self._validate_authority,
credential_factory=self._credentials_factory,
connector_client_configuration=self._connector_client_configuration,
logger=self._logger,
)
result = AuthenticateRequestResult()
result.claims_identity = claims_identity
result.audience = outbound_audience
result.caller_id = caller_id
result.connector_factory = connector_factory
return result
async def authenticate_streaming_request(
self, auth_header: str, channel_id_header: str
) -> AuthenticateRequestResult:
if channel_id_header is None:
is_auth_disabled = (
await self._credentials_factory.is_authentication_disabled()
)
if not is_auth_disabled:
raise PermissionError("Unauthorized Access. Request is not authorized")
claims_identity = await self._jwt_token_validation_validate_auth_header(
auth_header, channel_id_header
)
outbound_audience = (
JwtTokenValidation.get_app_id_from_claims(claims_identity.claims)
if SkillValidation.is_skill_claim(claims_identity.claims)
else self._to_channel_from_bot_oauth_scope
)
caller_id = await self.generate_caller_id(
credential_factory=self._credentials_factory,
claims_identity=claims_identity,
caller_id=self._caller_id,
)
result = AuthenticateRequestResult()
result.claims_identity = claims_identity
result.audience = outbound_audience
result.caller_id = caller_id
return result
def create_connector_factory(
self, claims_identity: ClaimsIdentity
) -> ConnectorFactory:
return _ConnectorFactoryImpl(
app_id=_BuiltinBotFrameworkAuthentication.get_app_id(claims_identity),
to_channel_from_bot_oauth_scope=self._to_channel_from_bot_oauth_scope,
login_endpoint=self._to_channel_from_bot_login_url,
validate_authority=self._validate_authority,
credential_factory=self._credentials_factory,
connector_client_configuration=self._connector_client_configuration,
logger=self._logger,
)
async def create_user_token_client(
self, claims_identity: ClaimsIdentity
) -> UserTokenClient:
app_id = _BuiltinBotFrameworkAuthentication.get_app_id(claims_identity)
credentials = await self._credentials_factory.create_credentials(
app_id,
oauth_scope=self._to_channel_from_bot_oauth_scope,
login_endpoint=self._to_channel_from_bot_login_url,
validate_authority=self._validate_authority,
)
return _UserTokenClientImpl(app_id, credentials, self._oauth_url)
def create_bot_framework_client(self) -> BotFrameworkClient:
return _BotFrameworkClientImpl(
self._credentials_factory,
self._http_client_factory,
self._to_channel_from_bot_login_url,
self._logger,
)
def get_originating_audience(self) -> str:
return self._to_channel_from_bot_oauth_scope
async def authenticate_channel_request(self, auth_header: str) -> ClaimsIdentity:
return await self._jwt_token_validation_validate_auth_header(
auth_header, channel_id="unknown"
)
async def _jwt_token_validation_authenticate_request(
self, activity: Activity, auth_header: str
) -> ClaimsIdentity:
if auth_header is None:
is_auth_disabled = (
await self._credentials_factory.is_authentication_disabled()
)
if not is_auth_disabled:
# No Auth Header. Auth is required. Request is not authorized.
raise PermissionError("Unauthorized Access. Request is not authorized")
# Check if the activity is for a skill call and is coming from the Emulator.
if (
activity.channel_id == Channels.emulator
and activity.recipient.role == RoleTypes.skill
):
# Return an anonymous claim with an anonymous skill AppId
return SkillValidation.create_anonymous_skill_claim()
# In the scenario where Auth is disabled, we still want to have the
# IsAuthenticated flag set in the ClaimsIdentity. To do this requires
# adding in an empty claim.
return ClaimsIdentity({}, True, AuthenticationConstants.ANONYMOUS_AUTH_TYPE)
# Validate the header and extract claims.
claims_identity = await self._jwt_token_validation_validate_auth_header(
auth_header, activity.channel_id, activity.service_url
)
return claims_identity
async def _jwt_token_validation_validate_auth_header(
self, auth_header: str, channel_id: str, service_url: Optional[str] = None
) -> ClaimsIdentity:
identity = await self._jwt_token_validation_authenticate_token(
auth_header, channel_id, service_url
)
await self._jwt_token_validation_validate_claims(identity.claims)
return identity
async def _jwt_token_validation_validate_claims(self, claims: Dict[str, object]):
if self._auth_configuration.claims_validator:
# Call the validation method if defined (it should throw an exception if the validation fails)
await self._auth_configuration.claims_validator([claims])
elif SkillValidation.is_skill_claim(claims):
raise PermissionError(
"ClaimsValidator is required for validation of Skill Host calls."
)
async def _jwt_token_validation_authenticate_token(
self, auth_header: str, channel_id: str, service_url: str
) -> ClaimsIdentity:
if SkillValidation.is_skill_token(auth_header):
return await self._skill_validation_authenticate_channel_token(
auth_header, channel_id
)
if EmulatorValidation.is_token_from_emulator(auth_header):
return await self._emulator_validation_authenticate_emulator_token(
auth_header, channel_id
)
return await self._government_channel_validation_authenticate_channel_token(
auth_header, service_url, channel_id
)
# // The following code is based on SkillValidation.authenticate_channel_token
async def _skill_validation_authenticate_channel_token(
self, auth_header: str, channel_id: str
) -> Optional[ClaimsIdentity]:
if not auth_header:
return None
validation_params = VerifyOptions(
issuer=[
# TODO: presumably this table should also come from configuration
# Auth v3.1, 1.0 token
"https://sts.windows.net/d6d49420-f39b-4df7-a1dc-d59a935871db/",
# Auth v3.1, 2.0 token
"https://login.microsoftonline.com/d6d49420-f39b-4df7-a1dc-d59a935871db/v2.0",
# Auth v3.2, 1.0 token
"https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/",
# Auth v3.2, 2.0 token
"https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
# Auth for US Gov, 1.0 token
"https://sts.windows.net/cab8a31a-1906-4287-a0d8-4eef66b95f6e/",
# Auth for US Gov, 2.0 token
"https://login.microsoftonline.us/cab8a31a-1906-4287-a0d8-4eef66b95f6e/v2.0",
],
audience=None, # Audience validation takes place manually in code.
clock_tolerance=5 * 60,
ignore_expiration=False,
)
if self._auth_configuration.valid_token_issuers:
validation_params.issuer.append(
self._auth_configuration.valid_token_issuers
)
# TODO: what should the openIdMetadataUrl be here?
token_extractor = JwtTokenExtractor(
validation_params,
metadata_url=self._to_bot_from_emulator_open_id_metadata_url,
allowed_algorithms=AuthenticationConstants.ALLOWED_SIGNING_ALGORITHMS,
)
parts = auth_header.split(" ")
if len(parts) != 2:
return None
identity = await token_extractor.get_identity(
schema=parts[0],
parameter=parts[1],
channel_id=channel_id,
required_endorsements=self._auth_configuration.required_endorsements,
)
await self._skill_validation_validate_identity(identity)
return identity
async def _skill_validation_validate_identity(self, identity: ClaimsIdentity):
if identity is None:
# No valid identity. Not Authorized.
raise PermissionError("Invalid Identity")
if not identity.is_authenticated:
# The token is in some way invalid. Not Authorized.
raise PermissionError("Token Not Authenticated")
version_claim = identity.get_claim_value(AuthenticationConstants.VERSION_CLAIM)
if not version_claim:
# No version claim
raise PermissionError(
f"'{AuthenticationConstants.VERSION_CLAIM}' claim is required on skill Tokens."
)
# Look for the "aud" claim, but only if issued from the Bot Framework
audience_claim = identity.get_claim_value(
AuthenticationConstants.AUDIENCE_CLAIM
)
if not audience_claim:
# Claim is not present or doesn't have a value. Not Authorized.
raise PermissionError(
f"'{AuthenticationConstants.AUDIENCE_CLAIM}' claim is required on skill Tokens."
)
is_valid_app_id = await self._credentials_factory.is_valid_app_id(
audience_claim
)
if not is_valid_app_id:
# The AppId is not valid. Not Authorized.
raise PermissionError("Invalid audience.")
app_id = JwtTokenValidation.get_app_id_from_claims(identity.claims)
if not app_id:
# Invalid appId
raise PermissionError("Invalid appId.")
# The following code is based on EmulatorValidation.authenticate_emulator_token
async def _emulator_validation_authenticate_emulator_token(
self, auth_header: str, channel_id: str
) -> Optional[ClaimsIdentity]:
if not auth_header:
return None
to_bot_from_emulator_validation_params = VerifyOptions(
issuer=[
# TODO: presumably this table should also come from configuration
# Auth v3.1, 1.0 token
"https://sts.windows.net/d6d49420-f39b-4df7-a1dc-d59a935871db/",
# Auth v3.1, 2.0 token
"https://login.microsoftonline.com/d6d49420-f39b-4df7-a1dc-d59a935871db/v2.0",
# Auth v3.2, 1.0 token
"https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/",
# Auth v3.2, 2.0 token
"https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
# Auth for US Gov, 1.0 token
"https://sts.windows.net/cab8a31a-1906-4287-a0d8-4eef66b95f6e/",
# Auth for US Gov, 2.0 token
"https://login.microsoftonline.us/cab8a31a-1906-4287-a0d8-4eef66b95f6e/v2.0",
],
audience=None, # Audience validation takes place manually in code.
clock_tolerance=5 * 60,
ignore_expiration=False,
)
if self._auth_configuration.valid_token_issuers:
to_bot_from_emulator_validation_params.issuer.append(
self._auth_configuration.valid_token_issuers
)
token_extractor = JwtTokenExtractor(
to_bot_from_emulator_validation_params,
metadata_url=self._to_bot_from_emulator_open_id_metadata_url,
allowed_algorithms=AuthenticationConstants.ALLOWED_SIGNING_ALGORITHMS,
)
parts = auth_header.split(" ")
if len(parts) != 2:
return None
identity = await token_extractor.get_identity(
schema=parts[0],
parameter=parts[1],
channel_id=channel_id,
required_endorsements=self._auth_configuration.required_endorsements,
)
if identity is None:
# No valid identity. Not Authorized.
raise PermissionError("Invalid Identity")
if not identity.is_authenticated:
# The token is in some way invalid. Not Authorized.
raise PermissionError("Token Not Authenticated")
# Now check that the AppID in the claim set matches
# what we're looking for. Note that in a multi-tenant bot, this value
# comes from developer code that may be reaching out to a service, hence the
# Async validation.
version_claim = identity.get_claim_value(AuthenticationConstants.VERSION_CLAIM)
if version_claim is None:
raise PermissionError("'ver' claim is required on Emulator Tokens.")
# The Emulator, depending on Version, sends the AppId via either the
# appid claim (Version 1) or the Authorized Party claim (Version 2).
if not version_claim or version_claim == "1.0":
# either no Version or a version of "1.0" means we should look for
# the claim in the "appid" claim.
app_id = identity.get_claim_value(AuthenticationConstants.APP_ID_CLAIM)
if not app_id:
# No claim around AppID. Not Authorized.
raise PermissionError(
"'appid' claim is required on Emulator Token version '1.0'."
)
elif version_claim == "2.0":
app_id = identity.get_claim_value(AuthenticationConstants.AUTHORIZED_PARTY)
if not app_id:
raise PermissionError(
"'azp' claim is required on Emulator Token version '2.0'."
)
else:
# Unknown Version. Not Authorized.
raise PermissionError(f"Unknown Emulator Token version '{version_claim}'.")
is_valid_app_id = await self._credentials_factory.is_valid_app_id(app_id)
if not is_valid_app_id:
raise PermissionError(f"Invalid AppId passed on token: {app_id}")
return identity
async def _government_channel_validation_authenticate_channel_token(
self, auth_header: str, service_url: str, channel_id: str
) -> Optional[ClaimsIdentity]:
if not auth_header:
return None
validation_params = VerifyOptions(
issuer=[self._to_bot_from_channel_token_issuer],
audience=None, # Audience validation takes place in JwtTokenExtractor
clock_tolerance=5 * 60,
ignore_expiration=False,
)
token_extractor = JwtTokenExtractor(
validation_params,
metadata_url=self._to_bot_from_channel_open_id_metadata_url,
allowed_algorithms=AuthenticationConstants.ALLOWED_SIGNING_ALGORITHMS,
)
parts = auth_header.split(" ")
if len(parts) != 2:
return None
identity = await token_extractor.get_identity(
schema=parts[0],
parameter=parts[1],
channel_id=channel_id,
required_endorsements=self._auth_configuration.required_endorsements,
)
await self._government_channel_validation_validate_identity(
identity, service_url
)
return identity
async def _government_channel_validation_validate_identity(
self, identity: ClaimsIdentity, service_url: str
):
if identity is None:
# No valid identity. Not Authorized.
raise PermissionError()
if not identity.is_authenticated:
# The token is in some way invalid. Not Authorized.
raise PermissionError()
# Now check that the AppID in the claim set matches
# what we're looking for. Note that in a multi-tenant bot, this value
# comes from developer code that may be reaching out to a service, hence the
# Async validation.
# Look for the "aud" claim, but only if issued from the Bot Framework
issuer = identity.get_claim_value(AuthenticationConstants.ISSUER_CLAIM)
if issuer != self._to_bot_from_channel_token_issuer:
raise PermissionError()
app_id = identity.get_claim_value(AuthenticationConstants.AUDIENCE_CLAIM)
if not app_id:
# The relevant audience Claim MUST be present. Not Authorized.
raise PermissionError()
# The AppId from the claim in the token must match the AppId specified by the developer.
# In this case, the token is destined for the app, so we find the app ID in the audience claim.
is_valid_app_id = await self._credentials_factory.is_valid_app_id(app_id)
if not is_valid_app_id:
# The AppId is not valid. Not Authorized.
raise PermissionError(f"Invalid AppId passed on token: {app_id}")
if service_url is not None:
service_url_claim = identity.get_claim_value(
AuthenticationConstants.SERVICE_URL_CLAIM
)
if not service_url_claim:
# Claim must be present. Not Authorized.
raise PermissionError()
if service_url_claim != service_url:
# Claim must match. Not Authorized.
raise PermissionError()
|
botbuilder-python/libraries/botframework-connector/botframework/connector/auth/_parameterized_bot_framework_authentication.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/_parameterized_bot_framework_authentication.py",
"repo_id": "botbuilder-python",
"token_count": 9456
}
| 388 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
class EndorsementsValidator:
@staticmethod
def validate(expected_endorsement: str, endorsements: List[str]):
# If the Activity came in and doesn't have a Channel ID then it's making no
# assertions as to who endorses it. This means it should pass.
if not expected_endorsement:
return True
if endorsements is None:
raise ValueError("Argument endorsements is null.")
# The Call path to get here is:
# JwtTokenValidation.AuthenticateRequest
# ->
# JwtTokenValidation.ValidateAuthHeader
# ->
# ChannelValidation.AuthenticateChannelToken
# ->
# JWTTokenExtractor
# Does the set of endorsements match the channelId that was passed in?
# ToDo: Consider moving this to a HashSet instead of a string
# array, to make lookups O(1) instead of O(N). To give a sense
# of scope, tokens from WebChat have about 10 endorsements, and
# tokens coming from Teams have about 20.
endorsement_present = expected_endorsement in endorsements
return endorsement_present
|
botbuilder-python/libraries/botframework-connector/botframework/connector/auth/endorsements_validator.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/endorsements_validator.py",
"repo_id": "botbuilder-python",
"token_count": 466
}
| 389 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from ._configuration import ConnectorClientConfiguration
from .operations import AttachmentsOperations
from .operations import ConversationsOperations
from . import models
class ConnectorClient(SDKClient):
"""The Bot Connector REST API allows your bot to send and receive messages to channels configured in the
[Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST
and JSON over HTTPS.
Client libraries for this REST API are available. See below for a list.
Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state).
The Bot State REST API allows a bot to store and retrieve state associated with users and conversations.
Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is
described in detail in the [Connector Authentication](/en-us/restapi/authentication) document.
# Client Libraries for the Bot Connector REST API
* [Bot Builder for C#](/en-us/csharp/builder/sdkreference/)
* [Bot Builder for Node.js](/en-us/node/builder/overview/)
* Generate your own from the
[Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library
/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json)
© 2016 Microsoft
:ivar config: Configuration for client.
:vartype config: ConnectorClientConfiguration
:ivar attachments: Attachments operations
:vartype attachments: botframework.connector.operations.AttachmentsOperations
:ivar conversations: Conversations operations
:vartype conversations: botframework.connector.operations.ConversationsOperations
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
:param str base_url: Service URL
"""
def __init__(self, credentials, base_url=None):
self.config = ConnectorClientConfiguration(credentials, base_url)
super(ConnectorClient, self).__init__(self.config.credentials, self.config)
client_models = {
k: v for k, v in models.__dict__.items() if isinstance(v, type)
}
self.api_version = "v3"
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.attachments = AttachmentsOperations(
self._client, self.config, self._serialize, self._deserialize
)
self.conversations = ConversationsOperations(
self._client, self.config, self._serialize, self._deserialize
)
|
botbuilder-python/libraries/botframework-connector/botframework/connector/connector_client.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/connector_client.py",
"repo_id": "botbuilder-python",
"token_count": 904
}
| 390 |
interactions:
- request:
body: '{"bot": {"id": "B21UTEF8S:T03CWQ0QB"}, "members": [], "activity": {"type":
"message", "channelId": "slack", "from": {"id": "B21UTEF8S:T03CWQ0QB"}, "text":
"Hi there!"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['168']
Content-Type: [application/json; charset=utf-8]
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.1 msrest/0.4.11
bot-connector/v3]
method: POST
uri: https://slack.botframework.com/v3/conversations
response:
body: {string: "{\r\n \"error\": {\r\n \"code\": \"BadArgument\",\r\n \"\
message\": \"Conversations must be to a single member\"\r\n }\r\n}"}
headers:
cache-control: [no-cache]
content-length: ['110']
content-type: [application/json; charset=utf-8]
date: ['Thu, 01 Feb 2018 15:20:17 GMT']
expires: ['-1']
pragma: [no-cache]
request-context: ['appId=cid-v1:6814484e-c0d5-40ea-9dba-74ff29ca4f62']
server: [Microsoft-IIS/10.0]
strict-transport-security: [max-age=31536000]
x-powered-by: [ASP.NET]
status: {code: 400, message: Bad Request}
version: 1
|
botbuilder-python/libraries/botframework-connector/tests/recordings/test_conversations_create_conversation_without_members_fails.yaml/0
|
{
"file_path": "botbuilder-python/libraries/botframework-connector/tests/recordings/test_conversations_create_conversation_without_members_fails.yaml",
"repo_id": "botbuilder-python",
"token_count": 587
}
| 391 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import traceback
from asyncio import iscoroutinefunction, isfuture
from typing import Callable, List
import botframework.streaming as streaming
from botframework.streaming.payloads import HeaderSerializer
from botframework.streaming.payloads.models import Header, PayloadTypes
from botframework.streaming.transport import (
DisconnectedEventArgs,
TransportConstants,
TransportReceiverBase,
)
class PayloadReceiver:
def __init__(self):
self._get_stream: Callable[[Header], List[int]] = None
self._receive_action: Callable[[Header, List[int], int], None] = None
self._receiver: TransportReceiverBase = None
self._is_disconnecting = False
self._receive_header_buffer: List[int] = [
None
] * TransportConstants.MAX_HEADER_LENGTH
self._receive_content_buffer: List[int] = [
None
] * TransportConstants.MAX_PAYLOAD_LENGTH
self.disconnected: Callable[[object, DisconnectedEventArgs], None] = None
@property
def is_connected(self) -> bool:
return self._receiver is not None
async def connect(self, receiver: TransportReceiverBase):
if self._receiver:
raise RuntimeError(f"{self.__class__.__name__} instance already connected.")
self._receiver = receiver
await self._run_receive()
async def _run_receive(self):
await self._receive_packets()
def subscribe(
self,
get_stream: Callable[[Header], List[int]],
receive_action: Callable[[Header, List[int]], int],
):
self._get_stream = get_stream
self._receive_action = receive_action
async def disconnect(self, event_args: DisconnectedEventArgs = None):
did_disconnect = False
if not self._is_disconnecting:
self._is_disconnecting = True
try:
try:
if self._receiver:
await self._receiver.close()
# TODO: investigate if 'dispose' is necessary
did_disconnect = True
except Exception:
traceback.print_exc()
self._receiver = None
if did_disconnect:
if callable(self.disconnected):
# pylint: disable=not-callable
if iscoroutinefunction(self.disconnected) or isfuture(
self.disconnected
):
await self.disconnected(
self, event_args or DisconnectedEventArgs.empty
)
else:
self.disconnected(
self, event_args or DisconnectedEventArgs.empty
)
finally:
self._is_disconnecting = False
async def _receive_packets(self):
is_closed = False
disconnect_args = None
while self._receiver and self._receiver.is_connected and not is_closed:
# receive a single packet
try:
# read the header
header_offset = 0
# TODO: this while is probalby not necessary
while header_offset < TransportConstants.MAX_HEADER_LENGTH:
length = await self._receiver.receive(
self._receive_header_buffer,
header_offset,
TransportConstants.MAX_HEADER_LENGTH - header_offset,
)
if length == 0:
# TODO: make custom exception
raise Exception(
"TransportDisconnectedException: Stream closed while reading header bytes"
)
header_offset += length
# deserialize the bytes into a header
header = HeaderSerializer.deserialize(
self._receive_header_buffer, 0, TransportConstants.MAX_HEADER_LENGTH
)
# read the payload
content_stream = self._get_stream(header)
buffer = (
[None] * header.payload_length
if PayloadTypes.is_stream(header)
else self._receive_content_buffer
)
offset = 0
if header.payload_length:
while offset < header.payload_length:
count = min(
header.payload_length - offset,
TransportConstants.MAX_PAYLOAD_LENGTH,
)
# Send: Packet content
length = await self._receiver.receive(buffer, offset, count)
if length == 0:
# TODO: make custom exception
raise Exception(
"TransportDisconnectedException: Stream closed while reading header bytes"
)
if content_stream is not None:
# write chunks to the content_stream if it's not a stream type
# TODO: this has to be improved in custom buffer class (validate buffer ended)
if not PayloadTypes.is_stream(header):
for index in range(offset, offset + length):
content_stream[index] = buffer[index]
offset += length
# give the full payload buffer to the contentStream if it's a stream
if PayloadTypes.is_stream(header) and isinstance(
content_stream, streaming.PayloadStream
):
content_stream.give_buffer(buffer)
self._receive_action(header, content_stream, offset)
except Exception as exception:
traceback.print_exc()
is_closed = True
disconnect_args = DisconnectedEventArgs(reason=str(exception))
await self.disconnect(disconnect_args)
|
botbuilder-python/libraries/botframework-streaming/botframework/streaming/payload_transport/payload_receiver.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payload_transport/payload_receiver.py",
"repo_id": "botbuilder-python",
"token_count": 3246
}
| 392 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from botframework.streaming.payload_transport import PayloadSender
from botframework.streaming.payloads import ResponseMessageStream
from botframework.streaming.payloads.models import PayloadTypes
from .payload_disassembler import PayloadDisassembler
class ResponseMessageStreamDisassembler(PayloadDisassembler):
def __init__(self, sender: PayloadSender, content_stream: ResponseMessageStream):
super().__init__(sender, content_stream.id)
self.content_stream = content_stream
@property
def type(self) -> str:
return PayloadTypes.STREAM
async def get_stream(self) -> List[int]:
# TODO: check if bypass is correct here or if serialization should take place.
# this is redundant -->stream: List[int] = list(str(self.content_stream.content).encode())
return self.content_stream.content
|
botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/disassemblers/response_message_stream_disassembler.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/disassemblers/response_message_stream_disassembler.py",
"repo_id": "botbuilder-python",
"token_count": 301
}
| 393 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List, Union, Type
from msrest.serialization import Model
from botframework.streaming.payloads import ContentStream
from botframework.streaming.payloads.models import Serializable
class ReceiveResponse:
def __init__(self, status_code: int = 0, streams: List[ContentStream] = None):
self.status_code = status_code
self.streams = streams or []
def read_body_as_json(
self, cls: Union[Type[Model], Type[Serializable]]
) -> Union[Model, Serializable]:
try:
body_str = self.read_body_as_str()
body = None
if issubclass(cls, Serializable):
body = cls().from_json(body_str)
elif isinstance(cls, Model):
body = cls.deserialize(body_str)
return body
except Exception as error:
raise error
def read_body_as_str(self) -> str:
try:
content_stream = self.read_body()
if not content_stream:
return ""
# TODO: encoding double check
return content_stream.decode("utf8")
except Exception as error:
raise error
def read_body(self) -> bytes:
try:
content_stream = self.streams[0] if self.streams else None
if not content_stream:
return None
return bytes(content_stream.stream)
except Exception as error:
raise error
|
botbuilder-python/libraries/botframework-streaming/botframework/streaming/receive_response.py/0
|
{
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/receive_response.py",
"repo_id": "botbuilder-python",
"token_count": 676
}
| 394 |
#
# Runs functional tests against the Slack channel.
#
# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber)
name: $(Build.BuildId)
pool:
vmImage: $[ coalesce( variables['VMImage'], 'windows-2019' ) ] # or 'windows-latest' or 'vs2017-win2016'
trigger: # ci trigger
batch: true
branches:
include:
- main
paths:
include:
- '*'
exclude:
- doc/
- specs/
- LICENSE
- README.md
- UsingTestPyPI.md
pr: # pr trigger
branches:
include:
- main
paths:
include:
- pipelines/botbuilder-python-ci-slack-test.yml
variables:
AppId: $(SlackTestBotAppId)
AppSecret: $(SlackTestBotAppSecret)
BotGroup: $(SlackTestBotBotGroup)
BotName: $(SlackTestBotBotName)
SlackBotToken: $(SlackTestBotSlackBotToken)
SlackClientSigningSecret: $(SlackTestBotSlackClientSigningSecret)
SlackVerificationToken: $(SlackTestBotSlackVerificationToken)
# AzureSubscription: define this in Azure
# SlackTestBotAppId: define this in Azure
# SlackTestBotAppSecret: define this in Azure
# SlackTestBotBotGroup: define this in Azure
# SlackTestBotBotName: define this in Azure
# SlackTestBotSlackBotToken: define this in Azure
# SlackTestBotSlackChannel: define this in Azure
# SlackTestBotSlackClientSigningSecret: define this in Azure
# SlackTestBotSlackVerificationToken: define this in Azure
# DeleteResourceGroup: (optional) define in Azure
steps:
- powershell: 'gci env:* | sort-object name | Format-Table -AutoSize -Wrap'
displayName: 'Display env vars'
- task: AzureCLI@2
displayName: 'Create Azure resources'
inputs:
azureSubscription: $(AzureSubscription)
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
Set-PSDebug -Trace 1;
# set up resource group, bot channels registration, app service, app service plan
az deployment sub create --name "$(BotName)" --template-file "$(System.DefaultWorkingDirectory)/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-new-rg.json" --location "westus" --parameters groupName="$(BotGroup)" appId="$(AppId)" appSecret="$(AppSecret)" botId="$(BotName)" botSku="F0" newAppServicePlanName="$(BotName)" newWebAppName="$(BotName)" slackVerificationToken="$(SlackVerificationToken)" slackBotToken="$(SlackBotToken)" slackClientSigningSecret="$(SlackClientSigningSecret)" groupLocation="westus" newAppServicePlanLocation="westus";
Set-PSDebug -Trace 0;
- powershell: |
7z a -tzip "$(System.DefaultWorkingDirectory)/libraries/functional-tests/slacktestbot/bot.zip" "$(System.DefaultWorkingDirectory)/libraries/functional-tests/slacktestbot/*" -aoa
displayName: 'Zip Bot'
- task: AzureCLI@1
displayName: 'Deploy bot'
inputs:
azureSubscription: $(AzureSubscription)
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)/libraries/functional-tests/slacktestbot/bot.zip" --timeout 300
- script: |
python -m pip install --upgrade pip
pip install -r ./libraries/functional-tests/requirements.txt
pip install pytest
displayName: 'Install test dependencies'
- script: |
pytest test_slack_client.py
workingDirectory: '$(System.DefaultWorkingDirectory)/libraries/functional-tests/tests/'
displayName: Run test
env:
BotName: $(SlackTestBotBotName)
SlackBotToken: $(SlackTestBotSlackBotToken)
SlackChannel: $(SlackTestBotSlackChannel)
SlackClientSigningSecret: $(SlackTestBotSlackClientSigningSecret)
SlackVerificationToken: $(SlackTestBotSlackVerificationToken)
- task: AzureCLI@1
displayName: 'Delete resources'
inputs:
azureSubscription: $(AzureSubscription)
scriptLocation: inlineScript
inlineScript: 'call az group delete -n "$(BotGroup)" --yes'
condition: and(always(), ne(variables['DeleteResourceGroup'], 'false'))
|
botbuilder-python/pipelines/botbuilder-python-ci-slack-test.yml/0
|
{
"file_path": "botbuilder-python/pipelines/botbuilder-python-ci-slack-test.yml",
"repo_id": "botbuilder-python",
"token_count": 1316
}
| 395 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.core import ActivityHandler, MessageFactory, TurnContext
from botbuilder.schema import ChannelAccount
class EchoBot(ActivityHandler):
async def on_members_added_activity(
self, members_added: [ChannelAccount], turn_context: TurnContext
):
for member in members_added:
if member.id != turn_context.activity.recipient.id:
await turn_context.send_activity("Hello and welcome!")
async def on_message_activity(self, turn_context: TurnContext):
return await turn_context.send_activity(
MessageFactory.text(f"Echo: {turn_context.activity.text}")
)
|
botbuilder-python/tests/skills/streamming-extensions/bots/echo_bot.py/0
|
{
"file_path": "botbuilder-python/tests/skills/streamming-extensions/bots/echo_bot.py",
"repo_id": "botbuilder-python",
"token_count": 252
}
| 396 |
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>allah-ar</key>
<string>allah-ar.glif</string>
<key>braceleft_bar.liga</key>
<string>braceleft_bar.liga.glif</string>
<key>braceright</key>
<string>braceright.glif</string>
<key>braceright_numbersign.liga</key>
<string>braceright_numbersign.liga.glif</string>
<key>numbersign_braceleft.liga</key>
<string>numbersign_braceleft.liga.glif</string>
</dict>
</plist>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs.public.background/contents.plist/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs.public.background/contents.plist",
"repo_id": "cascadia-code",
"token_count": 261
}
| 397 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Oslash" format="2">
<advance width="1200"/>
<unicode hex="00D8"/>
<outline>
<contour>
<point x="251" y="-134" type="line"/>
<point x="1114" y="1457" type="line"/>
<point x="929" y="1532" type="line"/>
<point x="66" y="-59" type="line"/>
</contour>
<component base="O"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>O</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/O_slash.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/O_slash.glif",
"repo_id": "cascadia-code",
"token_count": 374
}
| 398 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="ainTwodotsverticalabove-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="ain-ar.medi"/>
<component base="twodotsverticalabove-ar" xOffset="10" yOffset="253"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ainT_wodotsverticalabove-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ainT_wodotsverticalabove-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 170
}
| 399 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="bullseye" format="2">
<advance width="1200"/>
<unicode hex="25CE"/>
<note>
uni25CE
</note>
<outline>
<component base="largeCircle"/>
<component base="whiteBullet"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>largeCircle</string>
</dict>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>1</integer>
<key>name</key>
<string>whiteBullet</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/bullseye.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/bullseye.glif",
"repo_id": "cascadia-code",
"token_count": 428
}
| 400 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="cedi" format="2">
<advance width="1200"/>
<unicode hex="20B5"/>
<outline>
<contour>
<point x="576" y="-320" type="line"/>
<point x="830" y="-320" type="line"/>
<point x="830" y="1740" type="line"/>
<point x="576" y="1740" type="line"/>
</contour>
<component base="C"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>C</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/cedi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/cedi.glif",
"repo_id": "cascadia-code",
"token_count": 371
}
| 401 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="circumflex" format="2">
<advance width="1200"/>
<unicode hex="02C6"/>
<outline>
<component base="circumflexcomb"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>circumflexcomb</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/circumflex.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/circumflex.glif",
"repo_id": "cascadia-code",
"token_count": 278
}
| 402 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="gafTwodotsbelow-ar.init" format="2">
<advance width="1200"/>
<outline>
<component base="gaf-ar.init"/>
<component base="twodotshorizontalbelow-ar" xOffset="-33" yOffset="-24"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/gafT_wodotsbelow-ar.init.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/gafT_wodotsbelow-ar.init.glif",
"repo_id": "cascadia-code",
"token_count": 173
}
| 403 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="ghain-ar" format="2">
<advance width="1200"/>
<unicode hex="063A"/>
<outline>
<component base="ain-ar"/>
<component base="dotabove-ar" xOffset="-93" yOffset="456"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ghain-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ghain-ar.glif",
"repo_id": "cascadia-code",
"token_count": 169
}
| 404 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="hahHamzaabove-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="hah-ar.medi"/>
<component base="hamzaabove-ar" xOffset="-54" yOffset="-190"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hahH_amzaabove-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hahH_amzaabove-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 168
}
| 405 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="hahThreedotsabove-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="hah-ar.medi"/>
<component base="threedotsupabove-ar" xOffset="-34" yOffset="372"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hahT_hreedotsabove-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hahT_hreedotsabove-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 170
}
| 406 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="hungarumlaut" format="2">
<advance width="1200"/>
<unicode hex="02DD"/>
<outline>
<component base="hungarumlautcomb"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>hungarumlautcomb</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hungarumlaut.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/hungarumlaut.glif",
"repo_id": "cascadia-code",
"token_count": 283
}
| 407 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="jeemTwodotsabove-ar.init" format="2">
<advance width="1200"/>
<outline>
<component base="jeem-ar.init"/>
<component base="twodotshorizontalabove-ar" xOffset="-34" yOffset="382"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/jeemT_wodotsabove-ar.init.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/jeemT_wodotsabove-ar.init.glif",
"repo_id": "cascadia-code",
"token_count": 172
}
| 408 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="kehehThreedotsupbelow-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="keheh-ar.medi"/>
<component base="threedotsupbelow-ar" xOffset="47" yOffset="-24"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/kehehT_hreedotsupbelow-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/kehehT_hreedotsupbelow-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 173
}
| 409 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="lamDotabove-ar" format="2">
<advance width="1200"/>
<unicode hex="06B6"/>
<guideline x="166" y="551" angle="0"/>
<outline>
<component base="lam-ar"/>
<component base="dotabove-ar" xOffset="307" yOffset="925"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/lamD_otabove-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/lamD_otabove-ar.glif",
"repo_id": "cascadia-code",
"token_count": 188
}
| 410 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="noonAfrican-ar.init.alt" format="2">
<advance width="1200"/>
<guideline x="437" y="613" angle="0"/>
<anchor x="0" y="0" name="overlap"/>
<outline>
<component base="behDotless-ar.init.alt"/>
<component base="dotabove-ar" xOffset="275" yOffset="335"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>anchor</key>
<string>top.dot</string>
<key>index</key>
<integer>1</integer>
<key>name</key>
<string>dotabove-ar</string>
</dict>
</array>
<key>com.schriftgestaltung.Glyphs.category</key>
<string>Letter</string>
<key>com.schriftgestaltung.Glyphs.script</key>
<string>arabic</string>
<key>com.schriftgestaltung.Glyphs.subCategory</key>
<string>Other</string>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/noonA_frican-ar.init.alt.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/noonA_frican-ar.init.alt.glif",
"repo_id": "cascadia-code",
"token_count": 499
}
| 411 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="plus_plus.liga" format="2">
<advance width="1200"/>
<outline>
<component base="plus" xOffset="140"/>
<component base="plus" xOffset="1060"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>plus</string>
</dict>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>1</integer>
<key>name</key>
<string>plus</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/plus_plus.liga.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/plus_plus.liga.glif",
"repo_id": "cascadia-code",
"token_count": 410
}
| 412 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="rehHamzaabove-ar" format="2">
<advance width="1200"/>
<unicode hex="076C"/>
<outline>
<component base="reh-ar"/>
<component base="hamzaabove-ar" xOffset="110" yOffset="-419"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/rehH_amzaabove-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/rehH_amzaabove-ar.glif",
"repo_id": "cascadia-code",
"token_count": 174
}
| 413 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="rehVinvertedabove-ar" format="2">
<advance width="1200"/>
<unicode hex="06EF"/>
<outline>
<component base="reh-ar"/>
<component base="vinvertedabove-ar" xOffset="130" yOffset="153"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/rehV_invertedabove-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/rehV_invertedabove-ar.glif",
"repo_id": "cascadia-code",
"token_count": 173
}
| 414 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="sadTwodotsbelow-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="sad-ar.medi"/>
<component base="twodotshorizontalbelow-ar" xOffset="50" yOffset="-24"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/sadT_wodotsbelow-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/sadT_wodotsbelow-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 172
}
| 415 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="seenThreedotsbelow-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="seen-ar.medi"/>
<component base="threedotsdownbelow-ar" xOffset="30" yOffset="-4"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/seenT_hreedotsbelow-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/seenT_hreedotsbelow-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 168
}
| 416 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="seenVinvertedabove-ar" format="2">
<advance width="1200"/>
<unicode hex="077E"/>
<outline>
<component base="seen-ar"/>
<component base="vinvertedabove-ar" xOffset="191" yOffset="163"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/seenV_invertedabove-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/seenV_invertedabove-ar.glif",
"repo_id": "cascadia-code",
"token_count": 172
}
| 417 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="sheen-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="seen-ar.medi"/>
<component base="threedotsupabove-ar" xOffset="50" yOffset="153"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/sheen-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/sheen-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 164
}
| 418 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="tahTwodotsabove-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="tah-ar.medi"/>
<component base="twodotshorizontalabove-ar" xOffset="160" yOffset="353"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tahT_wodotsabove-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tahT_wodotsabove-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 171
}
| 419 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="tehMarbuta-ar" format="2">
<advance width="1200"/>
<unicode hex="0629"/>
<outline>
<component base="heh-ar"/>
<component base="twodotshorizontalabove-ar" xOffset="-1" yOffset="408"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tehM_arbuta-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tehM_arbuta-ar.glif",
"repo_id": "cascadia-code",
"token_count": 177
}
| 420 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="threequarters.BRACKET.500" format="2">
<advance width="1200"/>
<outline>
<contour>
<point x="211" y="269" type="line"/>
<point x="577" y="593" type="line"/>
<point x="484" y="715" type="line"/>
<point x="79" y="449" type="line"/>
</contour>
<contour>
<point x="710" y="692" type="line"/>
<point x="1121" y="969" type="line"/>
<point x="989" y="1143" type="line"/>
<point x="617" y="814" type="line"/>
</contour>
<component base="foursuperior" xOffset="240" yOffset="-802"/>
<component base="threesuperior" xOffset="-240"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>foursuperior</string>
</dict>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>1</integer>
<key>name</key>
<string>threesuperior</string>
</dict>
</array>
<key>com.schriftgestaltung.Glyphs._originalLayerName</key>
<string>[500]</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/threequarters.B_R_A_C_K_E_T_.500.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/threequarters.B_R_A_C_K_E_T_.500.glif",
"repo_id": "cascadia-code",
"token_count": 667
}
| 421 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="tugrik" format="2">
<advance width="1200"/>
<unicode hex="20AE"/>
<outline>
<contour>
<point x="144" y="629" type="line"/>
<point x="1056" y="779" type="line"/>
<point x="1056" y="1011" type="line"/>
<point x="144" y="861" type="line"/>
</contour>
<contour>
<point x="144" y="274" type="line"/>
<point x="1056" y="424" type="line"/>
<point x="1056" y="656" type="line"/>
<point x="144" y="506" type="line"/>
</contour>
<component base="T"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>T</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tugrik.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/tugrik.glif",
"repo_id": "cascadia-code",
"token_count": 469
}
| 422 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="veh-ar.medi" format="2">
<advance width="1200"/>
<outline>
<component base="fehDotless-ar.medi"/>
<component base="threedotsupabove-ar" xOffset="2" yOffset="347"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/veh-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/veh-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 167
}
| 423 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="wawDotabove-ar" format="2">
<advance width="1200"/>
<unicode hex="06CF"/>
<outline>
<component base="waw-ar"/>
<component base="dotabove-ar" xOffset="70" yOffset="228"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/wawD_otabove-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/wawD_otabove-ar.glif",
"repo_id": "cascadia-code",
"token_count": 171
}
| 424 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="yen" format="2">
<advance width="1200"/>
<unicode hex="00A5"/>
<outline>
<contour>
<point x="144" y="459" type="line"/>
<point x="1056" y="459" type="line"/>
<point x="1056" y="681" type="line"/>
<point x="144" y="681" type="line"/>
</contour>
<contour>
<point x="144" y="133" type="line"/>
<point x="1056" y="133" type="line"/>
<point x="1056" y="354" type="line"/>
<point x="144" y="354" type="line"/>
</contour>
<component base="Y"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>-1</integer>
<key>index</key>
<integer>0</integer>
<key>name</key>
<string>Y</string>
</dict>
</array>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/yen.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/yen.glif",
"repo_id": "cascadia-code",
"token_count": 467
}
| 425 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="zah-ar" format="2">
<advance width="1200"/>
<unicode hex="0638"/>
<outline>
<component base="tah-ar"/>
<component base="dotabove-ar" xOffset="160" yOffset="343"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/zah-ar.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/zah-ar.glif",
"repo_id": "cascadia-code",
"token_count": 168
}
| 426 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="IJ" format="2">
<advance width="1200"/>
<unicode hex="0132"/>
<guideline x="1046" y="226" angle="80"/>
<anchor x="506" y="0" name="bottom"/>
<anchor x="757" y="1420" name="top"/>
<outline>
<contour>
<point x="570" y="-20" type="curve" smooth="yes"/>
<point x="864" y="-20"/>
<point x="1022" y="123"/>
<point x="1077" y="436" type="curve" smooth="yes"/>
<point x="1250" y="1420" type="line"/>
<point x="984" y="1420" type="line"/>
<point x="811" y="436" type="line" smooth="yes"/>
<point x="786" y="296"/>
<point x="720" y="232"/>
<point x="596" y="232" type="curve" smooth="yes"/>
<point x="471" y="232"/>
<point x="421" y="293"/>
<point x="436" y="426" type="curve"/>
<point x="161" y="426" type="line"/>
<point x="103" y="120"/>
<point x="231" y="-20"/>
</contour>
<contour>
<point x="40" y="568" type="line"/>
<point x="626" y="568" type="line"/>
<point x="669" y="811" type="line"/>
<point x="83" y="811" type="line"/>
</contour>
<contour>
<point x="194" y="568" type="line"/>
<point x="456" y="568" type="line"/>
<point x="606" y="1420" type="line"/>
<point x="344" y="1420" type="line"/>
</contour>
<contour>
<point x="147" y="1177" type="line"/>
<point x="713" y="1177" type="line"/>
<point x="756" y="1420" type="line"/>
<point x="190" y="1420" type="line"/>
</contour>
<contour>
<point x="800" y="1177" type="line"/>
<point x="1083" y="1177" type="line"/>
<point x="1125" y="1420" type="line"/>
<point x="843" y="1420" type="line"/>
</contour>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-BoldItalic.ufo/glyphs/I_J_.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-BoldItalic.ufo/glyphs/I_J_.glif",
"repo_id": "cascadia-code",
"token_count": 851
}
| 427 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="gafThreedots-ar.medi" format="2">
<advance width="1200"/>
<guideline x="424" y="739" angle="0"/>
<anchor x="430" y="1850" name="top"/>
<outline>
<component base="gaf-ar.medi"/>
<component base="threedotsupabove-ar.v2" xScale="1.001" xOffset="-109" yOffset="726"/>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.98,0.36,0.67,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-ExtraLight.ufo/glyphs/gafT_hreedots-ar.medi.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-ExtraLight.ufo/glyphs/gafT_hreedots-ar.medi.glif",
"repo_id": "cascadia-code",
"token_count": 217
}
| 428 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Aacute" format="2">
<advance width="1200"/>
<unicode hex="00C1"/>
<outline>
<component base="A"/>
<component base="acutecomb.case"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/A_acute.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/A_acute.glif",
"repo_id": "cascadia-code",
"token_count": 92
}
| 429 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Endescender-cy" format="2">
<advance width="1200"/>
<unicode hex="04A2"/>
<outline>
<contour>
<point x="986" y="-321" type="line"/>
<point x="1023" y="-221"/>
<point x="1081" y="40"/>
<point x="1094" y="190" type="curve"/>
<point x="919" y="190" type="line"/>
<point x="881" y="0" type="line"/>
<point x="863" y="-85"/>
<point x="836" y="-190"/>
<point x="803" y="-281" type="curve"/>
</contour>
<component base="En-cy"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/E_ndescender-cy.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/E_ndescender-cy.glif",
"repo_id": "cascadia-code",
"token_count": 275
}
| 430 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Ka-cy" format="2">
<advance width="1200"/>
<unicode hex="041A"/>
<anchor x="506" y="0" name="bottom"/>
<anchor x="634" y="710" name="center"/>
<anchor x="757" y="1420" name="top"/>
<outline>
<contour>
<point x="67" y="0" type="line"/>
<point x="275" y="0" type="line"/>
<point x="525" y="1420" type="line"/>
<point x="317" y="1420" type="line"/>
</contour>
<contour>
<point x="253" y="531" type="line"/>
<point x="704" y="531" type="line"/>
<point x="737" y="721" type="line"/>
<point x="286" y="721" type="line"/>
</contour>
<contour>
<point x="805" y="0" type="line"/>
<point x="1039" y="0" type="line"/>
<point x="747" y="724" type="line"/>
<point x="550" y="660" type="line"/>
</contour>
<contour>
<point x="711" y="548" type="line"/>
<point x="990" y="743"/>
<point x="1211" y="1171"/>
<point x="1289" y="1420" type="curve"/>
<point x="1072" y="1420" type="line"/>
<point x="1012" y="1244"/>
<point x="801" y="811"/>
<point x="551" y="665" type="curve"/>
</contour>
</outline>
<lib>
<dict>
<key>public.markColor</key>
<string>0.65,0.48,0.2,1</string>
</dict>
</lib>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/K_a-cy.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/K_a-cy.glif",
"repo_id": "cascadia-code",
"token_count": 654
}
| 431 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Lcommaaccent" format="2">
<advance width="1200"/>
<unicode hex="013B"/>
<outline>
<component base="L"/>
<component base="commaaccentcomb"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/L_commaaccent.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/L_commaaccent.glif",
"repo_id": "cascadia-code",
"token_count": 92
}
| 432 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Ocircumflexdotbelow" format="2">
<advance width="1200"/>
<unicode hex="1ED8"/>
<outline>
<component base="O"/>
<component base="dotbelowcomb" xOffset="-1"/>
<component base="circumflexcomb.case"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/O_circumflexdotbelow.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/O_circumflexdotbelow.glif",
"repo_id": "cascadia-code",
"token_count": 113
}
| 433 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="Scaron" format="2">
<advance width="1200"/>
<unicode hex="0160"/>
<outline>
<component base="S"/>
<component base="caroncomb.case"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/S_caron.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/S_caron.glif",
"repo_id": "cascadia-code",
"token_count": 89
}
| 434 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="ecircumflexgrave" format="2">
<advance width="1200"/>
<unicode hex="1EC1"/>
<outline>
<component base="e"/>
<component base="circumflexcomb" xOffset="15"/>
<component base="gravecomb" xOffset="414" yOffset="340"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/ecircumflexgrave.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/ecircumflexgrave.glif",
"repo_id": "cascadia-code",
"token_count": 118
}
| 435 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="kje-cy" format="2">
<advance width="1200"/>
<unicode hex="045C"/>
<outline>
<component base="ka-cy"/>
<component base="acutecomb"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/kje-cy.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/kje-cy.glif",
"repo_id": "cascadia-code",
"token_count": 92
}
| 436 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="lcommaaccent.salt" format="2">
<advance width="1200"/>
<outline>
<component base="l.salt"/>
<component base="commaaccentcomb"/>
</outline>
</glyph>
|
cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/lcommaaccent.salt.glif/0
|
{
"file_path": "cascadia-code/sources/CascadiaCode-Italic.ufo/glyphs/lcommaaccent.salt.glif",
"repo_id": "cascadia-code",
"token_count": 88
}
| 437 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.