#[non_exhaustive]pub struct DocumentationPartLocationBuilder { /* private fields */ }Expand description
A builder for DocumentationPartLocation.
Implementations§
source§impl DocumentationPartLocationBuilder
impl DocumentationPartLocationBuilder
sourcepub fn type(self, input: DocumentationPartType) -> Self
pub fn type(self, input: DocumentationPartType) -> Self
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 set_type(self, input: Option<DocumentationPartType>) -> Self
pub fn set_type(self, input: Option<DocumentationPartType>) -> Self
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 get_type(&self) -> &Option<DocumentationPartType>
pub fn get_type(&self) -> &Option<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, input: impl Into<String>) -> Self
pub fn path(self, input: impl Into<String>) -> Self
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 set_path(self, input: Option<String>) -> Self
pub fn set_path(self, input: Option<String>) -> Self
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 get_path(&self) -> &Option<String>
pub fn get_path(&self) -> &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.
sourcepub fn method(self, input: impl Into<String>) -> Self
pub fn method(self, input: impl Into<String>) -> Self
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 set_method(self, input: Option<String>) -> Self
pub fn set_method(self, input: Option<String>) -> Self
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 get_method(&self) -> &Option<String>
pub fn get_method(&self) -> &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.
sourcepub fn status_code(self, input: impl Into<String>) -> Self
pub fn status_code(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_status_code(self, input: Option<String>) -> Self
pub fn set_status_code(self, input: Option<String>) -> Self
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.
sourcepub fn get_status_code(&self) -> &Option<String>
pub fn get_status_code(&self) -> &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.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
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.
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &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.
sourcepub fn build(self) -> Result<DocumentationPartLocation, BuildError>
pub fn build(self) -> Result<DocumentationPartLocation, BuildError>
Consumes the builder and constructs a DocumentationPartLocation.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for DocumentationPartLocationBuilder
impl Clone for DocumentationPartLocationBuilder
source§fn clone(&self) -> DocumentationPartLocationBuilder
fn clone(&self) -> DocumentationPartLocationBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for DocumentationPartLocationBuilder
impl Default for DocumentationPartLocationBuilder
source§fn default() -> DocumentationPartLocationBuilder
fn default() -> DocumentationPartLocationBuilder
source§impl PartialEq for DocumentationPartLocationBuilder
impl PartialEq for DocumentationPartLocationBuilder
source§fn eq(&self, other: &DocumentationPartLocationBuilder) -> bool
fn eq(&self, other: &DocumentationPartLocationBuilder) -> bool
self and other values to be equal, and is used
by ==.