#[non_exhaustive]pub struct DocumentationPartLocation {
pub type: DocumentationPartType,
pub path: Option<String>,
pub method: Option<String>,
pub status_code: Option<String>,
pub name: Option<String>,
}Expand description
Specifies the target API entity to which the documentation applies.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type: DocumentationPartTypeThe type of API entity to which the documentation content applies. Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.
path: Option<String>The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method: Option<String>The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
status_code: Option<String>The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name: Option<String>The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
Implementations§
source§impl DocumentationPartLocation
impl DocumentationPartLocation
sourcepub fn type(&self) -> &DocumentationPartType
pub fn type(&self) -> &DocumentationPartType
The type of API entity to which the documentation content applies. Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.
sourcepub fn path(&self) -> Option<&str>
pub fn path(&self) -> Option<&str>
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
sourcepub fn method(&self) -> Option<&str>
pub fn method(&self) -> Option<&str>
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
sourcepub fn status_code(&self) -> Option<&str>
pub fn status_code(&self) -> Option<&str>
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
source§impl DocumentationPartLocation
impl DocumentationPartLocation
sourcepub fn builder() -> DocumentationPartLocationBuilder
pub fn builder() -> DocumentationPartLocationBuilder
Creates a new builder-style object to manufacture DocumentationPartLocation.
Trait Implementations§
source§impl Clone for DocumentationPartLocation
impl Clone for DocumentationPartLocation
source§fn clone(&self) -> DocumentationPartLocation
fn clone(&self) -> DocumentationPartLocation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DocumentationPartLocation
impl Debug for DocumentationPartLocation
source§impl PartialEq for DocumentationPartLocation
impl PartialEq for DocumentationPartLocation
source§fn eq(&self, other: &DocumentationPartLocation) -> bool
fn eq(&self, other: &DocumentationPartLocation) -> bool
self and other values to be equal, and is used
by ==.