Skip to main content

ProjectsListResponse

Struct ProjectsListResponse 

Source
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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProjectsListResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProjectsListResponse

Source§

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

Source§

fn from(value: &ProjectsListResponse) -> Self

Converts to this type from the input type.
Source§

impl Serialize for ProjectsListResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more