autogen_squareup/models/retrieve_location_custom_attribute_response.rs
1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RetrieveLocationCustomAttributeResponse : Represents a [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RetrieveLocationCustomAttributeResponse {
17 #[serde(rename = "custom_attribute", skip_serializing_if = "Option::is_none")]
18 pub custom_attribute: Option<Box<models::CustomAttribute>>,
19 /// Any errors that occurred during the request.
20 #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
21 pub errors: Option<Vec<models::Error>>,
22}
23
24impl RetrieveLocationCustomAttributeResponse {
25 /// Represents a [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.
26 pub fn new() -> RetrieveLocationCustomAttributeResponse {
27 RetrieveLocationCustomAttributeResponse {
28 custom_attribute: None,
29 errors: None,
30 }
31 }
32}
33