This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* OpenADR 3 API | ||
* | ||
* The OpenADR 3 API supports energy retailer to energy customer Demand Response programs. The API includes the following capabilities and operations: __Manage programs:__ * Create/Update/Delete a program * Search programs __Manage events:__ * Create/Update/Delete an event * Search events __Manage reports:__ * Create/Update/Delete a report * Search reports __Manage subscriptions:__ * Create/Update/Delete subscriptions to programs, events, and reports * Search subscriptions * Subscriptions allows clients to register a callback URL (webhook) to be notified on the change of state of a resource __Manage vens:__ * Create/Update/Delete vens and ven resources * Search ven and ven resources __Manage tokens:__ * Obtain an access token * This endpoint is provided as a convenience and may be neglected in a commercial implementation | ||
* The OpenADR 3 API supports energy retailer to energy customer Demand Response programs. The API includes the following capabilities and operations: __Manage programs:__ * Create/Update/Delete a program * Search programs __Manage events:__ * Create/Update/Delete an event * Search events __Manage reports:__ * Create/Update/Delete a report * Search reports __Manage subscriptions:__ * Create/Update/Delete subscriptions to programs, events, and reports * Search subscriptions * Subscriptions allows clients to register a callback URL (webhook) to be notified on the change of state of a resource __Manage vens:__ * Create/Update/Delete vens and ven resources * Search ven and ven resources __Manage tokens:__ * Obtain an access token * This endpoint is provided as a convenience and may be neglected in a commercial implementation | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* Contact: [email protected] | ||
|
@@ -10,31 +10,29 @@ | |
|
||
use serde::{Deserialize, Serialize}; | ||
|
||
/// Problem : reusable error response. From https://opensource.zalando.com/problem/schema.yaml. | ||
|
||
|
||
/// Problem : reusable error response. From <https://opensource.zalando.com/problem/schema.yaml>. | ||
|
||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] | ||
pub struct Problem { | ||
/// An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). | ||
/// An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). | ||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")] | ||
pub r#type: Option<String>, | ||
/// A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable. | ||
/// A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable. | ||
#[serde(rename = "title", skip_serializing_if = "Option::is_none")] | ||
pub title: Option<String>, | ||
/// The HTTP status code generated by the origin server for this occurrence of the problem. | ||
/// The HTTP status code generated by the origin server for this occurrence of the problem. | ||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")] | ||
pub status: Option<i32>, | ||
/// A human readable explanation specific to this occurrence of the problem. | ||
/// A human readable explanation specific to this occurrence of the problem. | ||
#[serde(rename = "detail", skip_serializing_if = "Option::is_none")] | ||
pub detail: Option<String>, | ||
/// An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. | ||
/// An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. | ||
#[serde(rename = "instance", skip_serializing_if = "Option::is_none")] | ||
pub instance: Option<String>, | ||
} | ||
|
||
impl Problem { | ||
/// reusable error response. From https://opensource.zalando.com/problem/schema.yaml. | ||
/// reusable error response. From <https://opensource.zalando.com/problem/schema.yaml>. | ||
pub fn new() -> Problem { | ||
Problem { | ||
r#type: None, | ||
|
@@ -45,5 +43,3 @@ impl Problem { | |
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters