mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
458 lines
14 KiB
Go
458 lines
14 KiB
Go
/*
|
|
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/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the ProjectProjectsCreate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProjectProjectsCreate{}
|
|
|
|
// ProjectProjectsCreate struct for ProjectProjectsCreate
|
|
type ProjectProjectsCreate struct {
|
|
// Analytics is the opt-OUT for the wired-by-default analytics beacon: absent (nil) ⇒ ON (the default); explicit false ⇒ off. A pointer so \"unset\" is distinguishable from \"false\" — the only way to turn the default off.
|
|
Analytics *bool `json:"analytics,omitempty"`
|
|
// Description is the one-line summary, copied onto anything forked from this project.
|
|
Description *string `json:"description,omitempty"`
|
|
// Framework is a BUILD HINT from a closed set, defaulting to static. It tells CI how to build a linked repo and never gates a deploy.
|
|
Framework *string `json:"framework,omitempty"`
|
|
// License is the terms that upstream work carries.
|
|
License *string `json:"license,omitempty"`
|
|
// Name is the project's display name and the only REQUIRED field. When slug is omitted it is also what the slug is derived from.
|
|
Name *string `json:"name,omitempty"`
|
|
Repo *ProjectProjectsCreateRepo `json:"repo,omitempty"`
|
|
// Slug is the handle everything else addresses this project by: the public host `<slug>.hanzo.app`, the object-store key segment, and the path parameter of every later call. Derived from the name when omitted. It is a hostname label, so it is constrained and reserved labels such as `api` or `admin` are refused.
|
|
Slug *string `json:"slug,omitempty"`
|
|
// Upstream credits the third-party work this project was published from. It is accepted from any caller: giving away credit can only cost the publisher, so it needs no gate.
|
|
Upstream *string `json:"upstream,omitempty"`
|
|
// Visibility is \"public\" (the default when absent) or \"private\". Publishing publicly is ungated — that is the point of a community. Going PRIVATE is the paid feature, so an unfunded org asking for it is refused rather than silently downgraded (see resolve).
|
|
Visibility *string `json:"visibility,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProjectProjectsCreate ProjectProjectsCreate
|
|
|
|
// NewProjectProjectsCreate instantiates a new ProjectProjectsCreate object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewProjectProjectsCreate() *ProjectProjectsCreate {
|
|
this := ProjectProjectsCreate{}
|
|
return &this
|
|
}
|
|
|
|
// NewProjectProjectsCreateWithDefaults instantiates a new ProjectProjectsCreate object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewProjectProjectsCreateWithDefaults() *ProjectProjectsCreate {
|
|
this := ProjectProjectsCreate{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnalytics returns the Analytics field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetAnalytics() bool {
|
|
if o == nil || IsNil(o.Analytics) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Analytics
|
|
}
|
|
|
|
// GetAnalyticsOk returns a tuple with the Analytics field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetAnalyticsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Analytics) {
|
|
return nil, false
|
|
}
|
|
return o.Analytics, true
|
|
}
|
|
|
|
// HasAnalytics returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasAnalytics() bool {
|
|
if o != nil && !IsNil(o.Analytics) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAnalytics gets a reference to the given bool and assigns it to the Analytics field.
|
|
func (o *ProjectProjectsCreate) SetAnalytics(v bool) {
|
|
o.Analytics = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *ProjectProjectsCreate) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetFramework returns the Framework field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetFramework() string {
|
|
if o == nil || IsNil(o.Framework) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Framework
|
|
}
|
|
|
|
// GetFrameworkOk returns a tuple with the Framework field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetFrameworkOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Framework) {
|
|
return nil, false
|
|
}
|
|
return o.Framework, true
|
|
}
|
|
|
|
// HasFramework returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasFramework() bool {
|
|
if o != nil && !IsNil(o.Framework) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFramework gets a reference to the given string and assigns it to the Framework field.
|
|
func (o *ProjectProjectsCreate) SetFramework(v string) {
|
|
o.Framework = &v
|
|
}
|
|
|
|
// GetLicense returns the License field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetLicense() string {
|
|
if o == nil || IsNil(o.License) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.License
|
|
}
|
|
|
|
// GetLicenseOk returns a tuple with the License field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetLicenseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.License) {
|
|
return nil, false
|
|
}
|
|
return o.License, true
|
|
}
|
|
|
|
// HasLicense returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasLicense() bool {
|
|
if o != nil && !IsNil(o.License) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLicense gets a reference to the given string and assigns it to the License field.
|
|
func (o *ProjectProjectsCreate) SetLicense(v string) {
|
|
o.License = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *ProjectProjectsCreate) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetRepo() ProjectProjectsCreateRepo {
|
|
if o == nil || IsNil(o.Repo) {
|
|
var ret ProjectProjectsCreateRepo
|
|
return ret
|
|
}
|
|
return *o.Repo
|
|
}
|
|
|
|
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetRepoOk() (*ProjectProjectsCreateRepo, bool) {
|
|
if o == nil || IsNil(o.Repo) {
|
|
return nil, false
|
|
}
|
|
return o.Repo, true
|
|
}
|
|
|
|
// HasRepo returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasRepo() bool {
|
|
if o != nil && !IsNil(o.Repo) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepo gets a reference to the given ProjectProjectsCreateRepo and assigns it to the Repo field.
|
|
func (o *ProjectProjectsCreate) SetRepo(v ProjectProjectsCreateRepo) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetSlug() string {
|
|
if o == nil || IsNil(o.Slug) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Slug
|
|
}
|
|
|
|
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetSlugOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Slug) {
|
|
return nil, false
|
|
}
|
|
return o.Slug, true
|
|
}
|
|
|
|
// HasSlug returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasSlug() bool {
|
|
if o != nil && !IsNil(o.Slug) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSlug gets a reference to the given string and assigns it to the Slug field.
|
|
func (o *ProjectProjectsCreate) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
// GetUpstream returns the Upstream field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetUpstream() string {
|
|
if o == nil || IsNil(o.Upstream) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Upstream
|
|
}
|
|
|
|
// GetUpstreamOk returns a tuple with the Upstream field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetUpstreamOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Upstream) {
|
|
return nil, false
|
|
}
|
|
return o.Upstream, true
|
|
}
|
|
|
|
// HasUpstream returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasUpstream() bool {
|
|
if o != nil && !IsNil(o.Upstream) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpstream gets a reference to the given string and assigns it to the Upstream field.
|
|
func (o *ProjectProjectsCreate) SetUpstream(v string) {
|
|
o.Upstream = &v
|
|
}
|
|
|
|
// GetVisibility returns the Visibility field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsCreate) GetVisibility() string {
|
|
if o == nil || IsNil(o.Visibility) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Visibility
|
|
}
|
|
|
|
// GetVisibilityOk returns a tuple with the Visibility field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsCreate) GetVisibilityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Visibility) {
|
|
return nil, false
|
|
}
|
|
return o.Visibility, true
|
|
}
|
|
|
|
// HasVisibility returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsCreate) HasVisibility() bool {
|
|
if o != nil && !IsNil(o.Visibility) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVisibility gets a reference to the given string and assigns it to the Visibility field.
|
|
func (o *ProjectProjectsCreate) SetVisibility(v string) {
|
|
o.Visibility = &v
|
|
}
|
|
|
|
func (o ProjectProjectsCreate) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProjectProjectsCreate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Analytics) {
|
|
toSerialize["analytics"] = o.Analytics
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Framework) {
|
|
toSerialize["framework"] = o.Framework
|
|
}
|
|
if !IsNil(o.License) {
|
|
toSerialize["license"] = o.License
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.Slug) {
|
|
toSerialize["slug"] = o.Slug
|
|
}
|
|
if !IsNil(o.Upstream) {
|
|
toSerialize["upstream"] = o.Upstream
|
|
}
|
|
if !IsNil(o.Visibility) {
|
|
toSerialize["visibility"] = o.Visibility
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProjectProjectsCreate) UnmarshalJSON(data []byte) (err error) {
|
|
varProjectProjectsCreate := _ProjectProjectsCreate{}
|
|
|
|
err = json.Unmarshal(data, &varProjectProjectsCreate)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProjectProjectsCreate(varProjectProjectsCreate)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "analytics")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "framework")
|
|
delete(additionalProperties, "license")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "upstream")
|
|
delete(additionalProperties, "visibility")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProjectProjectsCreate struct {
|
|
value *ProjectProjectsCreate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProjectProjectsCreate) Get() *ProjectProjectsCreate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProjectProjectsCreate) Set(val *ProjectProjectsCreate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProjectProjectsCreate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProjectProjectsCreate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProjectProjectsCreate(val *ProjectProjectsCreate) *NullableProjectProjectsCreate {
|
|
return &NullableProjectProjectsCreate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProjectProjectsCreate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProjectProjectsCreate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|