/* 
 * Strava API v3
 *
 * The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.
 *
 * OpenAPI spec version: 3.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */


#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct DetailedGear {
  /// The gear's unique identifier.
  #[serde(rename = "id")]
  id: Option<String>,
  /// Resource state, indicates level of detail. Possible values: 2 -> \"summary\", 3 -> \"detail\"
  #[serde(rename = "resource_state")]
  resource_state: Option<i32>,
  /// Whether this gear's is the owner's default one.
  #[serde(rename = "primary")]
  primary: Option<bool>,
  /// The gear's name.
  #[serde(rename = "name")]
  name: Option<String>,
  /// The distance logged with this gear.
  #[serde(rename = "distance")]
  distance: Option<f32>,
  /// The gear's brand name.
  #[serde(rename = "brand_name")]
  brand_name: Option<String>,
  /// The gear's model name.
  #[serde(rename = "model_name")]
  model_name: Option<String>,
  /// The gear's frame type (bike only).
  #[serde(rename = "frame_type")]
  frame_type: Option<i32>,
  /// The gear's description.
  #[serde(rename = "description")]
  description: Option<String>
}

impl DetailedGear {
  pub fn new() -> DetailedGear {
    DetailedGear {
      id: None,
      resource_state: None,
      primary: None,
      name: None,
      distance: None,
      brand_name: None,
      model_name: None,
      frame_type: None,
      description: None
    }
  }

  pub fn set_id(&mut self, id: String) {
    self.id = Some(id);
  }

  pub fn with_id(mut self, id: String) -> DetailedGear {
    self.id = Some(id);
    self
  }

  pub fn id(&self) -> Option<&String> {
    self.id.as_ref()
  }

  pub fn reset_id(&mut self) {
    self.id = None;
  }

  pub fn set_resource_state(&mut self, resource_state: i32) {
    self.resource_state = Some(resource_state);
  }

  pub fn with_resource_state(mut self, resource_state: i32) -> DetailedGear {
    self.resource_state = Some(resource_state);
    self
  }

  pub fn resource_state(&self) -> Option<&i32> {
    self.resource_state.as_ref()
  }

  pub fn reset_resource_state(&mut self) {
    self.resource_state = None;
  }

  pub fn set_primary(&mut self, primary: bool) {
    self.primary = Some(primary);
  }

  pub fn with_primary(mut self, primary: bool) -> DetailedGear {
    self.primary = Some(primary);
    self
  }

  pub fn primary(&self) -> Option<&bool> {
    self.primary.as_ref()
  }

  pub fn reset_primary(&mut self) {
    self.primary = None;
  }

  pub fn set_name(&mut self, name: String) {
    self.name = Some(name);
  }

  pub fn with_name(mut self, name: String) -> DetailedGear {
    self.name = Some(name);
    self
  }

  pub fn name(&self) -> Option<&String> {
    self.name.as_ref()
  }

  pub fn reset_name(&mut self) {
    self.name = None;
  }

  pub fn set_distance(&mut self, distance: f32) {
    self.distance = Some(distance);
  }

  pub fn with_distance(mut self, distance: f32) -> DetailedGear {
    self.distance = Some(distance);
    self
  }

  pub fn distance(&self) -> Option<&f32> {
    self.distance.as_ref()
  }

  pub fn reset_distance(&mut self) {
    self.distance = None;
  }

  pub fn set_brand_name(&mut self, brand_name: String) {
    self.brand_name = Some(brand_name);
  }

  pub fn with_brand_name(mut self, brand_name: String) -> DetailedGear {
    self.brand_name = Some(brand_name);
    self
  }

  pub fn brand_name(&self) -> Option<&String> {
    self.brand_name.as_ref()
  }

  pub fn reset_brand_name(&mut self) {
    self.brand_name = None;
  }

  pub fn set_model_name(&mut self, model_name: String) {
    self.model_name = Some(model_name);
  }

  pub fn with_model_name(mut self, model_name: String) -> DetailedGear {
    self.model_name = Some(model_name);
    self
  }

  pub fn model_name(&self) -> Option<&String> {
    self.model_name.as_ref()
  }

  pub fn reset_model_name(&mut self) {
    self.model_name = None;
  }

  pub fn set_frame_type(&mut self, frame_type: i32) {
    self.frame_type = Some(frame_type);
  }

  pub fn with_frame_type(mut self, frame_type: i32) -> DetailedGear {
    self.frame_type = Some(frame_type);
    self
  }

  pub fn frame_type(&self) -> Option<&i32> {
    self.frame_type.as_ref()
  }

  pub fn reset_frame_type(&mut self) {
    self.frame_type = None;
  }

  pub fn set_description(&mut self, description: String) {
    self.description = Some(description);
  }

  pub fn with_description(mut self, description: String) -> DetailedGear {
    self.description = Some(description);
    self
  }

  pub fn description(&self) -> Option<&String> {
    self.description.as_ref()
  }

  pub fn reset_description(&mut self) {
    self.description = None;
  }

}



