1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PublishReq {
/// Category groups the listing in the shop window.
#[serde(rename = "category", skip_serializing_if = "Option::is_none")]
pub category: Option<String>,
/// Currency denominates Price.
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<String>,
/// Description is the long copy, clipped at 4096 characters.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Price is the per-call price as a decimal USD string, exact to 18 places — \"0.0025\" is a quarter of a cent and stays one. Empty or \"0\" (the default) publishes it free; any positive price makes the listing monetized and requires Recipient.
#[serde(rename = "price", skip_serializing_if = "Option::is_none")]
pub price: Option<String>,
/// Public makes the listing discoverable by other orgs. Private otherwise.
#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
pub public: Option<bool>,
/// Recipient is the seller's payout wallet ID, in the publishing org — the wallet x402 pays. Required for a monetized listing.
#[serde(rename = "recipient", skip_serializing_if = "Option::is_none")]
pub recipient: Option<String>,
/// Title is the shop-window name, 1-200 characters. Required.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Tool is the registry name of the capability being offered. It must already resolve in the publisher's own scope — there are no phantom listings.
#[serde(rename = "tool", skip_serializing_if = "Option::is_none")]
pub tool: Option<String>,
}
impl PublishReq {
pub fn new() -> PublishReq {
PublishReq {
category: None,
currency: None,
description: None,
price: None,
public: None,
recipient: None,
title: None,
tool: None,
}
}
}