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
9 changed files
with
21 additions
and
37 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 +1 @@ | ||
pub mod models; | ||
pub mod models; |
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] | ||
|
@@ -12,13 +12,9 @@ use serde::{Deserialize, Serialize}; | |
|
||
/// NotificationObject : the object that is the subject of the notification. | ||
|
||
|
||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] | ||
#[serde(tag = "objecttype")] | ||
pub struct NotificationObject { | ||
} | ||
|
||
|
||
pub struct NotificationObject {} | ||
|
||
/// Used as discriminator, e.g. notification.object | ||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] | ||
|
@@ -32,4 +28,3 @@ impl Default for ObjectType { | |
Self::Resource | ||
} | ||
} | ||
|
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,15 +1,15 @@ | ||
/* | ||
* 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] | ||
* Generated by: https://openapi-generator.tech | ||
*/ | ||
|
||
use std::fmt::Display; | ||
use serde::{Deserialize, Serialize}; | ||
use std::fmt::Display; | ||
|
||
/// ObjectTypes : Types of objects addressable through API. | ||
|
||
|
@@ -28,7 +28,6 @@ pub enum ObjectTypes { | |
Ven, | ||
#[serde(rename = "RESOURCE")] | ||
Resource, | ||
|
||
} | ||
|
||
impl Display for ObjectTypes { | ||
|
@@ -50,7 +49,3 @@ impl Default for ObjectTypes { | |
Self::Program | ||
} | ||
} | ||
|
||
|
||
|
||
|
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] | ||
|
@@ -12,8 +12,6 @@ use serde::{Deserialize, Serialize}; | |
|
||
/// Point : A pair of floats typically used as a point on a 2 dimensional grid. | ||
|
||
|
||
|
||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] | ||
pub struct Point { | ||
/// A value on an x axis. | ||
|
@@ -27,11 +25,6 @@ pub struct Point { | |
impl Point { | ||
/// A pair of floats typically used as a point on a 2 dimensional grid. | ||
pub fn new(x: f32, y: f32) -> Point { | ||
Point { | ||
x, | ||
y, | ||
} | ||
Point { x, y } | ||
} | ||
} | ||
|
||
|
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,20 +1,18 @@ | ||
/* | ||
* 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] | ||
* Generated by: https://openapi-generator.tech | ||
*/ | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use crate::generated::models::ObjectTypes; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// SubscriptionObjectOperationsInner : object type, operations, and callbackUrl. | ||
|
||
|
||
|
||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] | ||
pub struct SubscriptionObjectOperationsInner { | ||
/// list of objects to subscribe to. | ||
|
@@ -26,14 +24,18 @@ pub struct SubscriptionObjectOperationsInner { | |
/// User provided webhook URL. | ||
#[serde(rename = "callbackUrl")] | ||
pub callback_url: String, | ||
/// User provided token. To avoid custom integrations, callback endpoints should accept the provided bearer token to authenticate VTN requests. | ||
/// User provided token. To avoid custom integrations, callback endpoints should accept the provided bearer token to authenticate VTN requests. | ||
#[serde(rename = "bearerToken", skip_serializing_if = "Option::is_none")] | ||
pub bearer_token: Option<String>, | ||
} | ||
|
||
impl SubscriptionObjectOperationsInner { | ||
/// object type, operations, and callbackUrl. | ||
pub fn new(objects: Vec<ObjectTypes>, operations: Vec<Operations>, callback_url: String) -> SubscriptionObjectOperationsInner { | ||
pub fn new( | ||
objects: Vec<ObjectTypes>, | ||
operations: Vec<Operations>, | ||
callback_url: String, | ||
) -> SubscriptionObjectOperationsInner { | ||
SubscriptionObjectOperationsInner { | ||
objects, | ||
operations, | ||
|
@@ -61,4 +63,3 @@ impl Default for Operations { | |
Self::Get | ||
} | ||
} | ||
|
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