Skip to content

Commit

Permalink
feat: update client all
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsh committed Nov 27, 2024
1 parent 1b76e6c commit 1e8b469
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart';
| **format** | **String** | String identifying the format of this Credential, i.e., ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] |
| **credentialSupported** | [**List<CredentialSupportedObject>**](CredentialSupportedObject.md) | | [default to const []] |
| **issuerMetadata** | [**Map<String, Object>**](Object.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to const {}] |
| **returnUris** | **List<String>** | List of allowed URIs to be returned to after issuance | [optional] [default to const []] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart';
| **credentialSupported** | [**List<CredentialSupportedObject>**](CredentialSupportedObject.md) | | [optional] [default to const []] |
| **issuerMetadata** | [**Map<String, Object>**](Object.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to const {}] |
| **version** | **int** | | [optional] |
| **returnUris** | **List<String>** | List of allowed URIs to be returned to after issuance | [optional] [default to const []] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart';
| **issuerUri** | **String** | Issuer URI | [optional] |
| **credentialSupported** | [**List<CredentialSupportedObject>**](CredentialSupportedObject.md) | | [optional] [default to const []] |
| **issuerMetadata** | [**Map<String, Object>**](Object.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to const {}] |
| **returnUris** | **List<String>** | List of allowed URIs to be returned to after issuance | [optional] [default to const []] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class CreateIssuanceConfigInput {
this.format,
this.credentialSupported = const [],
this.issuerMetadata = const {},
this.returnUris = const [],
});

///
Expand Down Expand Up @@ -61,6 +62,9 @@ class CreateIssuanceConfigInput {
/// Issuer public information wallet may want to show to user during consent confirmation
Map<String, Object> issuerMetadata;

/// List of allowed URIs to be returned to after issuance
List<String> returnUris;

@override
bool operator ==(Object other) => identical(this, other) || other is CreateIssuanceConfigInput &&
other.name == name &&
Expand All @@ -69,7 +73,8 @@ class CreateIssuanceConfigInput {
other.credentialOfferDuration == credentialOfferDuration &&
other.format == format &&
_deepEquality.equals(other.credentialSupported, credentialSupported) &&
_deepEquality.equals(other.issuerMetadata, issuerMetadata);
_deepEquality.equals(other.issuerMetadata, issuerMetadata) &&
_deepEquality.equals(other.returnUris, returnUris);

@override
int get hashCode =>
Expand All @@ -80,10 +85,11 @@ class CreateIssuanceConfigInput {
(credentialOfferDuration == null ? 0 : credentialOfferDuration!.hashCode) +
(format == null ? 0 : format!.hashCode) +
(credentialSupported.hashCode) +
(issuerMetadata.hashCode);
(issuerMetadata.hashCode) +
(returnUris.hashCode);

@override
String toString() => 'CreateIssuanceConfigInput[name=$name, description=$description, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, format=$format, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata]';
String toString() => 'CreateIssuanceConfigInput[name=$name, description=$description, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, format=$format, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata, returnUris=$returnUris]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand All @@ -110,6 +116,7 @@ class CreateIssuanceConfigInput {
}
json[r'credentialSupported'] = this.credentialSupported;
json[r'issuerMetadata'] = this.issuerMetadata;
json[r'returnUris'] = this.returnUris;
return json;
}

Expand Down Expand Up @@ -139,6 +146,9 @@ class CreateIssuanceConfigInput {
format: CreateIssuanceConfigInputFormatEnum.fromJson(json[r'format']),
credentialSupported: CredentialSupportedObject.listFromJson(json[r'credentialSupported']),
issuerMetadata: mapCastOfType<String, Object>(json, r'issuerMetadata') ?? const {},
returnUris: json[r'returnUris'] is Iterable
? (json[r'returnUris'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class IssuanceConfigDto {
this.credentialSupported = const [],
this.issuerMetadata = const {},
this.version,
this.returnUris = const [],
});

///
Expand Down Expand Up @@ -112,6 +113,9 @@ class IssuanceConfigDto {
///
int? version;

/// List of allowed URIs to be returned to after issuance
List<String> returnUris;

@override
bool operator ==(Object other) => identical(this, other) || other is IssuanceConfigDto &&
other.id == id &&
Expand All @@ -125,7 +129,8 @@ class IssuanceConfigDto {
other.issuerUri == issuerUri &&
_deepEquality.equals(other.credentialSupported, credentialSupported) &&
_deepEquality.equals(other.issuerMetadata, issuerMetadata) &&
other.version == version;
other.version == version &&
_deepEquality.equals(other.returnUris, returnUris);

@override
int get hashCode =>
Expand All @@ -141,10 +146,11 @@ class IssuanceConfigDto {
(issuerUri == null ? 0 : issuerUri!.hashCode) +
(credentialSupported.hashCode) +
(issuerMetadata.hashCode) +
(version == null ? 0 : version!.hashCode);
(version == null ? 0 : version!.hashCode) +
(returnUris.hashCode);

@override
String toString() => 'IssuanceConfigDto[id=$id, name=$name, description=$description, issuerDid=$issuerDid, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, cNonceDuration=$cNonceDuration, format=$format, issuerUri=$issuerUri, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata, version=$version]';
String toString() => 'IssuanceConfigDto[id=$id, name=$name, description=$description, issuerDid=$issuerDid, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, cNonceDuration=$cNonceDuration, format=$format, issuerUri=$issuerUri, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata, version=$version, returnUris=$returnUris]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand Down Expand Up @@ -200,6 +206,7 @@ class IssuanceConfigDto {
} else {
json[r'version'] = null;
}
json[r'returnUris'] = this.returnUris;
return json;
}

Expand Down Expand Up @@ -234,6 +241,9 @@ class IssuanceConfigDto {
credentialSupported: CredentialSupportedObject.listFromJson(json[r'credentialSupported']),
issuerMetadata: mapCastOfType<String, Object>(json, r'issuerMetadata') ?? const {},
version: mapValueOfType<int>(json, r'version'),
returnUris: json[r'returnUris'] is Iterable
? (json[r'returnUris'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class UpdateIssuanceConfigInput {
this.issuerUri,
this.credentialSupported = const [],
this.issuerMetadata = const {},
this.returnUris = const [],
});

///
Expand Down Expand Up @@ -77,6 +78,9 @@ class UpdateIssuanceConfigInput {
/// Issuer public information wallet may want to show to user during consent confirmation
Map<String, Object> issuerMetadata;

/// List of allowed URIs to be returned to after issuance
List<String> returnUris;

@override
bool operator ==(Object other) => identical(this, other) || other is UpdateIssuanceConfigInput &&
other.name == name &&
Expand All @@ -86,7 +90,8 @@ class UpdateIssuanceConfigInput {
other.format == format &&
other.issuerUri == issuerUri &&
_deepEquality.equals(other.credentialSupported, credentialSupported) &&
_deepEquality.equals(other.issuerMetadata, issuerMetadata);
_deepEquality.equals(other.issuerMetadata, issuerMetadata) &&
_deepEquality.equals(other.returnUris, returnUris);

@override
int get hashCode =>
Expand All @@ -98,10 +103,11 @@ class UpdateIssuanceConfigInput {
(format == null ? 0 : format!.hashCode) +
(issuerUri == null ? 0 : issuerUri!.hashCode) +
(credentialSupported.hashCode) +
(issuerMetadata.hashCode);
(issuerMetadata.hashCode) +
(returnUris.hashCode);

@override
String toString() => 'UpdateIssuanceConfigInput[name=$name, description=$description, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, format=$format, issuerUri=$issuerUri, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata]';
String toString() => 'UpdateIssuanceConfigInput[name=$name, description=$description, issuerWalletId=$issuerWalletId, credentialOfferDuration=$credentialOfferDuration, format=$format, issuerUri=$issuerUri, credentialSupported=$credentialSupported, issuerMetadata=$issuerMetadata, returnUris=$returnUris]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand Down Expand Up @@ -137,6 +143,7 @@ class UpdateIssuanceConfigInput {
}
json[r'credentialSupported'] = this.credentialSupported;
json[r'issuerMetadata'] = this.issuerMetadata;
json[r'returnUris'] = this.returnUris;
return json;
}

Expand Down Expand Up @@ -167,6 +174,9 @@ class UpdateIssuanceConfigInput {
issuerUri: mapValueOfType<String>(json, r'issuerUri'),
credentialSupported: CredentialSupportedObject.listFromJson(json[r'credentialSupported']),
issuerMetadata: mapCastOfType<String, Object>(json, r'issuerMetadata') ?? const {},
returnUris: json[r'returnUris'] is Iterable
? (json[r'returnUris'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ class InvalidDidParameterErrorMessageEnum {

String toJson() => value;

static const givenDidInFieldQuoteToDidQuoteIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod = InvalidDidParameterErrorMessageEnum._(r'Given did in field 'toDid' is invalid. Use only resolvable form of did.');
static const givenDidInFieldToDidIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod = InvalidDidParameterErrorMessageEnum._(r'Given did in field toDid is invalid. Use only resolvable form of did.');

/// List of all possible values in this [enum][InvalidDidParameterErrorMessageEnum].
static const values = <InvalidDidParameterErrorMessageEnum>[
givenDidInFieldQuoteToDidQuoteIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod,
givenDidInFieldToDidIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod,
];

static InvalidDidParameterErrorMessageEnum? fromJson(dynamic value) => InvalidDidParameterErrorMessageEnumTypeTransformer().decode(value);
Expand Down Expand Up @@ -265,7 +265,7 @@ class InvalidDidParameterErrorMessageEnumTypeTransformer {
InvalidDidParameterErrorMessageEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'Given did in field 'toDid' is invalid. Use only resolvable form of did.': return InvalidDidParameterErrorMessageEnum.givenDidInFieldQuoteToDidQuoteIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod;
case r'Given did in field toDid is invalid. Use only resolvable form of did.': return InvalidDidParameterErrorMessageEnum.givenDidInFieldToDidIsInvalidPeriodUseOnlyResolvableFormOfDidPeriod;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class CreateIssuanceConfigInput(BaseModel):
format: Optional[StrictStr] = Field(default=None, description="String identifying the format of this Credential, i.e., ldp_vc. Depending on the format value, the object contains further elements defining the type")
credential_supported: conlist(CredentialSupportedObject) = Field(default=..., alias="credentialSupported")
issuer_metadata: Optional[Dict[str, Any]] = Field(default=None, alias="issuerMetadata", description="Issuer public information wallet may want to show to user during consent confirmation")
__properties = ["name", "description", "issuerWalletId", "credentialOfferDuration", "format", "credentialSupported", "issuerMetadata"]
return_uris: Optional[conlist(StrictStr)] = Field(default=None, alias="returnUris", description="List of allowed URIs to be returned to after issuance")
__properties = ["name", "description", "issuerWalletId", "credentialOfferDuration", "format", "credentialSupported", "issuerMetadata", "returnUris"]

@validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -105,7 +106,8 @@ def from_dict(cls, obj: dict) -> CreateIssuanceConfigInput:
"credential_offer_duration": obj.get("credentialOfferDuration"),
"format": obj.get("format"),
"credential_supported": [CredentialSupportedObject.from_dict(_item) for _item in obj.get("credentialSupported")] if obj.get("credentialSupported") is not None else None,
"issuer_metadata": obj.get("issuerMetadata")
"issuer_metadata": obj.get("issuerMetadata"),
"return_uris": obj.get("returnUris")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class IssuanceConfigDto(BaseModel):
credential_supported: Optional[conlist(CredentialSupportedObject, min_items=1)] = Field(default=None, alias="credentialSupported")
issuer_metadata: Optional[Dict[str, Any]] = Field(default=None, alias="issuerMetadata", description="Issuer public information wallet may want to show to user during consent confirmation")
version: Optional[Union[StrictFloat, StrictInt]] = None
__properties = ["id", "name", "description", "issuerDid", "issuerWalletId", "credentialOfferDuration", "cNonceDuration", "format", "issuerUri", "credentialSupported", "issuerMetadata", "version"]
return_uris: Optional[conlist(StrictStr)] = Field(default=None, alias="returnUris", description="List of allowed URIs to be returned to after issuance")
__properties = ["id", "name", "description", "issuerDid", "issuerWalletId", "credentialOfferDuration", "cNonceDuration", "format", "issuerUri", "credentialSupported", "issuerMetadata", "version", "returnUris"]

@validator('format')
def format_validate_enum(cls, value):
Expand Down Expand Up @@ -105,7 +106,8 @@ def from_dict(cls, obj: dict) -> IssuanceConfigDto:
"issuer_uri": obj.get("issuerUri"),
"credential_supported": [CredentialSupportedObject.from_dict(_item) for _item in obj.get("credentialSupported")] if obj.get("credentialSupported") is not None else None,
"issuer_metadata": obj.get("issuerMetadata"),
"version": obj.get("version")
"version": obj.get("version"),
"return_uris": obj.get("returnUris")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class UpdateIssuanceConfigInput(BaseModel):
issuer_uri: Optional[StrictStr] = Field(default=None, alias="issuerUri", description="Issuer URI")
credential_supported: Optional[conlist(CredentialSupportedObject)] = Field(default=None, alias="credentialSupported")
issuer_metadata: Optional[Dict[str, Any]] = Field(default=None, alias="issuerMetadata", description="Issuer public information wallet may want to show to user during consent confirmation")
__properties = ["name", "description", "issuerWalletId", "credentialOfferDuration", "format", "issuerUri", "credentialSupported", "issuerMetadata"]
return_uris: Optional[conlist(StrictStr)] = Field(default=None, alias="returnUris", description="List of allowed URIs to be returned to after issuance")
__properties = ["name", "description", "issuerWalletId", "credentialOfferDuration", "format", "issuerUri", "credentialSupported", "issuerMetadata", "returnUris"]

@validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -107,7 +108,8 @@ def from_dict(cls, obj: dict) -> UpdateIssuanceConfigInput:
"format": obj.get("format"),
"issuer_uri": obj.get("issuerUri"),
"credential_supported": [CredentialSupportedObject.from_dict(_item) for _item in obj.get("credentialSupported")] if obj.get("credentialSupported") is not None else None,
"issuer_metadata": obj.get("issuerMetadata")
"issuer_metadata": obj.get("issuerMetadata"),
"return_uris": obj.get("returnUris")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| **format** | **str** | String identifying the format of this Credential, i.e., ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] |
| **credential_supported** | [**List[CredentialSupportedObject]**](CredentialSupportedObject.md) | |
| **issuer_metadata** | **Dict[str, object]** | Issuer public information wallet may want to show to user during consent confirmation | [optional] |
| **return_uris** | **List[str]** | List of allowed URIs to be returned to after issuance | [optional] |

## Example

Expand Down
Loading

0 comments on commit 1e8b469

Please sign in to comment.