pub struct ProjectsListResponse {
pub links: Option<ProjectsListResponseLinks>,
pub meta: ProjectsListResponseMeta,
pub projects: Vec<ProjectsListResponseProjectsItem>,
}Expand description
ProjectsListResponse
JSON schema
{
"examples": [
{
"links": {
"pages": {
"first": "https://api.digitalocean.com/v2/projects?page=1",
"last": "https://api.digitalocean.com/v2/projects?page=1"
}
},
"meta": {
"total": 2
},
"projects": [
{
"created_at": "2018-09-27T20:10:35Z",
"description": "My website API",
"environment": "Production",
"id": "4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679",
"is_default": false,
"name": "my-web-api",
"owner_id": 258992,
"owner_uuid": "99525febec065ca37b2ffe4f852fd2b2581895e7",
"purpose": "Service or API",
"updated_at": "2018-09-27T20:10:35Z"
},
{
"created_at": "2017-10-19T21:44:20Z",
"description": "Default project",
"environment": "Development",
"id": "addb4547-6bab-419a-8542-76263a033cf6",
"is_default": true,
"name": "Default",
"owner_id": 258992,
"owner_uuid": "99525febec065ca37b2ffe4f852fd2b2581895e7",
"purpose": "Just trying out DigitalOcean",
"updated_at": "2019-11-05T18:50:03Z"
}
]
}
],
"allOf": [
{
"type": "object",
"properties": {
"projects": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"created_at": {
"description": "A time value given in ISO8601 combined date and time format that represents when the project was created.",
"readOnly": true,
"examples": [
"2018-09-27T20:10:35Z"
],
"type": "string",
"format": "date-time"
},
"description": {
"description": "The description of the project. The maximum length is 255 characters.",
"examples": [
"My website API"
],
"type": "string",
"maxLength": 255
},
"environment": {
"description": "The environment of the project's resources.",
"examples": [
"Production"
],
"type": "string",
"enum": [
"Development",
"Staging",
"Production"
]
},
"id": {
"description": "The unique universal identifier of this project.",
"readOnly": true,
"examples": [
"4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679"
],
"type": "string",
"format": "uuid"
},
"name": {
"description": "The human-readable name for the project. The maximum length is 175 characters and the name must be unique.",
"examples": [
"my-web-api"
],
"type": "string",
"maxLength": 175
},
"owner_id": {
"description": "The integer id of the project owner.",
"readOnly": true,
"examples": [
258992
],
"type": "integer"
},
"owner_uuid": {
"description": "The unique universal identifier of the project owner.",
"readOnly": true,
"examples": [
"99525febec065ca37b2ffe4f852fd2b2581895e7"
],
"type": "string"
},
"purpose": {
"description": "The purpose of the project. The maximum length is 255 characters. It can\nhave one of the following values:\n\n- Just trying out DigitalOcean\n- Class project / Educational purposes\n- Website or blog\n- Web Application\n- Service or API\n- Mobile Application\n- Machine learning / AI / Data processing\n- IoT\n- Operational / Developer tooling\n\nIf another value for purpose is specified, for example, \"your custom purpose\",\nyour purpose will be stored as `Other: your custom purpose`.\n",
"examples": [
"Service or API"
],
"type": "string",
"maxLength": 255
},
"updated_at": {
"description": "A time value given in ISO8601 combined date and time format that represents when the project was updated.",
"readOnly": true,
"examples": [
"2018-09-27T20:10:35Z"
],
"type": "string",
"format": "date-time"
}
}
},
{
"type": "object",
"properties": {
"is_default": {
"description": "If true, all resources will be added to this project if no project is specified.",
"examples": [
false
],
"type": "boolean"
}
}
}
]
}
}
}
},
{
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"pages": {
"examples": [
{
"pages": {
"first": "https://api.digitalocean.com/v2/account/keys?page=1",
"prev": "https://api.digitalocean.com/v2/account/keys?page=2"
}
}
],
"anyOf": [
{
"type": "object",
"properties": {
"first": {
"examples": [
"https://api.digitalocean.com/v2/images?page=1"
],
"type": "string",
"format": "uri"
},
"last": {
"examples": [
"https://api.digitalocean.com/v2/images?page=3"
],
"type": "string",
"format": "uri"
},
"next": {
"examples": [
"https://api.digitalocean.com/v2/images?page=2"
],
"type": "string",
"format": "uri"
}
}
},
{
"type": "object",
"properties": {
"first": {
"examples": [
"https://api.digitalocean.com/v2/images?page=1"
],
"type": "string",
"format": "uri"
},
"last": {
"examples": [
"https://api.digitalocean.com/v2/images?page=3"
],
"type": "string",
"format": "uri"
},
"prev": {
"examples": [
"https://api.digitalocean.com/v2/images?page=1"
],
"type": "string",
"format": "uri"
}
}
},
{}
]
}
}
}
}
},
{
"type": "object",
"required": [
"meta"
],
"properties": {
"meta": {
"allOf": [
{
"description": "Information about the response itself.",
"type": "object",
"properties": {
"total": {
"description": "Number of objects returned by the request.",
"examples": [
1
],
"type": "integer"
}
}
},
{
"required": [
"total"
]
}
]
}
}
}
]
}Fields§
§links: Option<ProjectsListResponseLinks>§meta: ProjectsListResponseMeta§projects: Vec<ProjectsListResponseProjectsItem>Trait Implementations§
Source§impl Clone for ProjectsListResponse
impl Clone for ProjectsListResponse
Source§fn clone(&self) -> ProjectsListResponse
fn clone(&self) -> ProjectsListResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectsListResponse
impl Debug for ProjectsListResponse
Source§impl<'de> Deserialize<'de> for ProjectsListResponse
impl<'de> Deserialize<'de> for ProjectsListResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ProjectsListResponse> for ProjectsListResponse
impl From<&ProjectsListResponse> for ProjectsListResponse
Source§fn from(value: &ProjectsListResponse) -> Self
fn from(value: &ProjectsListResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProjectsListResponse
impl RefUnwindSafe for ProjectsListResponse
impl Send for ProjectsListResponse
impl Sync for ProjectsListResponse
impl Unpin for ProjectsListResponse
impl UnsafeUnpin for ProjectsListResponse
impl UnwindSafe for ProjectsListResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more