Open lilachic opened 2 weeks ago
This PR adds autogenerated DRS (Data Repository Service) client models to the codebase. The models are generated from the OpenAPI specification version 1.4.0 and include all necessary data structures for interacting with a DRS service. The implementation follows Rust's standard practices for serializable data models using serde.
classDiagram
class DrsObject {
+String id
+Option<String> name
+String self_uri
+i64 size
+String created_time
+Option<String> updated_time
+Option<String> version
+Option<String> mime_type
+Vec<Checksum> checksums
+Option<Vec<AccessMethod>> access_methods
+Option<Vec<ContentsObject>> contents
+Option<String> description
+Option<Vec<String>> aliases
+new(String id, String self_uri, i64 size, String created_time, Vec<Checksum> checksums)
}
class AccessMethod {
+Type type
+Option<Box<AccessMethodAccessUrl>> access_url
+Option<String> access_id
+Option<String> region
+Option<bool> available
+Option<Box<AccessMethodAuthorizations>> authorizations
+new(Type type)
}
class GetServiceInfo200Response {
+String id
+String name
+Box<DrsServiceType> type
+Option<String> description
+Box<ServiceOrganization> organization
+Option<String> contact_url
+Option<String> documentation_url
+Option<String> created_at
+Option<String> updated_at
+Option<String> environment
+String version
+i32 max_bulk_request_length
+new(String id, String name, DrsServiceType type, ServiceOrganization organization, String version, i32 max_bulk_request_length)
}
class Service {
+String id
+String name
+Box<ServiceType> type
+Option<String> description
+Box<ServiceOrganization> organization
+Option<String> contact_url
+Option<String> documentation_url
+Option<String> created_at
+Option<String> updated_at
+Option<String> environment
+String version
+new(String id, String name, ServiceType type, ServiceOrganization organization, String version)
}
class AccessMethodAuthorizations {
+Option<String> drs_object_id
+Option<Vec<SupportedTypes>> supported_types
+Option<Vec<String>> passport_auth_issuers
+Option<Vec<String>> bearer_auth_issuers
+new()
}
class Authorizations {
+Option<String> drs_object_id
+Option<Vec<SupportedTypes>> supported_types
+Option<Vec<String>> passport_auth_issuers
+Option<Vec<String>> bearer_auth_issuers
+new()
}
class BulkAccessUrl {
+Option<String> drs_object_id
+Option<String> drs_access_id
+String url
+Option<Vec<String>> headers
+new(String url)
}
class ServiceOrganization {
+String name
+String url
+new(String name, String url)
}
class Checksum {
+String checksum
+String type
+new(String checksum, String type)
}
class AccessMethodAccessUrl {
+String url
+Option<Vec<String>> headers
+new(String url)
}
class AccessUrl {
+String url
+Option<Vec<String>> headers
+new(String url)
}
class ContentsObject {
+String name
+Option<String> id
+Option<Vec<String>> drs_uri
+Option<Vec<ContentsObject>> contents
+new(String name)
}
class DrsServiceType {
+Artifact artifact
+new(Artifact artifact)
}
class ServiceType {
+String group
+String artifact
+String version
+new(String group, String artifact, String version)
}
class Summary {
+Option<i32> requested
+Option<i32> resolved
+Option<i32> unresolved
+new()
}
class Error {
+Option<String> msg
+Option<i32> status_code
+new()
}
class GetBulkAccessUrl200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<BulkAccessUrl>> resolved_drs_object_access_urls
+new()
}
class GetBulkObjects200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<DrsObject>> resolved_drs_object
+new()
}
class OptionsBulkObject200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<Authorizations>> resolved_drs_object
+new()
}
class UnresolvedInner {
+Option<i32> error_code
+Option<Vec<String>> object_ids
+new()
}
class PostAccessUrlRequest {
+Option<Vec<String>> passports
+new()
}
class PostObjectRequest {
+Option<bool> expand
+Option<Vec<String>> passports
+new()
}
class DrsService {
+i32 max_bulk_request_length
+Box<DrsServiceType> type
+new(i32 max_bulk_request_length, DrsServiceType type)
}
class DrsServiceType {
+Artifact artifact
+new(Artifact artifact)
}
class Artifact {
<<enumeration>>
Drs
}
class SupportedTypes {
<<enumeration>>
None
BasicAuth
BearerAuth
PassportAuth
}
class Type {
<<enumeration>>
S3
Gs
Ftp
Gsiftp
Globus
Htsget
Https
File
}
Change | Details | Files |
---|---|---|
Added new DRS client module with autogenerated models |
|
lib/src/clients/mod.rs lib/src/clients/drs/mod.rs lib/src/clients/drs/models/mod.rs |
Implemented core DRS data models |
|
lib/src/clients/drs/models/drs_object.rs lib/src/clients/drs/models/access_method.rs lib/src/clients/drs/models/checksum.rs lib/src/clients/drs/models/get_service_info_200_response.rs |
Added support models for DRS operations |
|
lib/src/clients/drs/models/bulk_access_url.rs lib/src/clients/drs/models/error.rs lib/src/clients/drs/models/authorizations.rs lib/src/clients/drs/models/post_access_url_request.rs lib/src/clients/drs/models/post_object_request.rs |
Fixes https://github.com/orgs/elixir-cloud-aai/projects/23/views/1?filterQuery=&pane=issue&itemId=85797382&issue=elixir-cloud-aai%7Cga4gh-sdk%7C55 .
Added:
lib/src/clients/drs
Added:lib/src/clients/drs/mod.rs
Modified:./lib/src/clients/mod.rs
to containd drs module. Autogenerated:lib/src/clients/drs/models/*.rs
Summary by Sourcery
New Features: