pub struct ProjectsListResourcesDefaultResponse {
pub links: Option<ProjectsListResourcesDefaultResponseLinks>,
pub meta: ProjectsListResourcesDefaultResponseMeta,
pub resources: Vec<ProjectsListResourcesDefaultResponseResourcesItem>,
}Expand description
ProjectsListResourcesDefaultResponse
JSON schema
{
"examples": [
{
"links": {
"pages": {
"first": "https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1",
"last": "https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1"
}
},
"meta": {
"total": 2
},
"resources": [
{
"assigned_at": "2018-09-28T19:26:37Z",
"links": {
"self": "https://api.digitalocean.com/v2/droplets/13457723"
},
"status": "ok",
"urn": "do:droplet:13457723"
},
{
"assigned_at": "2019-03-31T16:24:14Z",
"links": {
"self": "https://api.digitalocean.com/v2/domains/example.com"
},
"status": "ok",
"urn": "do:domain:example.com"
}
]
}
],
"allOf": [
{
"type": "object",
"properties": {
"resources": {
"description": "The resources that are assigned to this project. Only resources that you are authorized to see will be returned.",
"type": "array",
"items": {
"type": "object",
"properties": {
"assigned_at": {
"description": "A time value given in ISO8601 combined date and time format that represents when the project was created.",
"examples": [
"2018-09-28T19:26:37Z"
],
"type": "string",
"format": "date-time"
},
"links": {
"description": "The links object contains the `self` object, which contains the resource relationship.",
"type": "object",
"properties": {
"self": {
"description": "A URI that can be used to retrieve the resource.",
"examples": [
"https://api.digitalocean.com/v2/droplets/13457723"
],
"type": "string",
"format": "uri"
}
}
},
"status": {
"description": "The status of assigning and fetching the resources.",
"examples": [
"ok"
],
"type": "string",
"enum": [
"ok",
"not_found",
"assigned",
"already_assigned",
"service_down"
]
},
"urn": {
"description": "The uniform resource name (URN) for the resource in the format do:resource_type:resource_id.",
"examples": [
"do:droplet:13457723"
],
"type": "string",
"pattern": "^do:(dbaas|domain|droplet|floatingip|loadbalancer|space|volume|kubernetes|vpc):.*"
}
}
}
}
}
},
{
"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<ProjectsListResourcesDefaultResponseLinks>§meta: ProjectsListResourcesDefaultResponseMeta§resources: Vec<ProjectsListResourcesDefaultResponseResourcesItem>The resources that are assigned to this project. Only resources that you are authorized to see will be returned.
Trait Implementations§
Source§impl Clone for ProjectsListResourcesDefaultResponse
impl Clone for ProjectsListResourcesDefaultResponse
Source§fn clone(&self) -> ProjectsListResourcesDefaultResponse
fn clone(&self) -> ProjectsListResourcesDefaultResponse
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<'de> Deserialize<'de> for ProjectsListResourcesDefaultResponse
impl<'de> Deserialize<'de> for ProjectsListResourcesDefaultResponse
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<&ProjectsListResourcesDefaultResponse> for ProjectsListResourcesDefaultResponse
impl From<&ProjectsListResourcesDefaultResponse> for ProjectsListResourcesDefaultResponse
Source§fn from(value: &ProjectsListResourcesDefaultResponse) -> Self
fn from(value: &ProjectsListResourcesDefaultResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProjectsListResourcesDefaultResponse
impl RefUnwindSafe for ProjectsListResourcesDefaultResponse
impl Send for ProjectsListResourcesDefaultResponse
impl Sync for ProjectsListResourcesDefaultResponse
impl Unpin for ProjectsListResourcesDefaultResponse
impl UnsafeUnpin for ProjectsListResourcesDefaultResponse
impl UnwindSafe for ProjectsListResourcesDefaultResponse
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