mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
12 KiB
Go
421 lines
12 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 ProviderGitlabProjectView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGitlabProjectView{}
|
|
|
|
// ProviderGitlabProjectView struct for ProviderGitlabProjectView
|
|
type ProviderGitlabProjectView struct {
|
|
// CloneURL is the https remote to clone.
|
|
CloneUrl *string `json:"cloneUrl,omitempty"`
|
|
// DefaultBranch is the branch a clone lands on (\"main\" when GitLab names none, which is what an empty project reports).
|
|
DefaultBranch *string `json:"defaultBranch,omitempty"`
|
|
// Description is the project's own, empty when it has none.
|
|
Description *string `json:"description,omitempty"`
|
|
// FullName is the namespace path (\"acme/widgets\", \"acme/team/widgets\" for a subgroup) — the string GitLab calls path_with_namespace.
|
|
FullName *string `json:"fullName,omitempty"`
|
|
// HTMLURL is the project's page.
|
|
HtmlUrl *string `json:"htmlUrl,omitempty"`
|
|
// Name is the project's path segment (\"widgets\"), not its display name.
|
|
Name *string `json:"name,omitempty"`
|
|
// Private is true for anything not publicly visible (private or internal).
|
|
Private *bool `json:"private,omitempty"`
|
|
// PushedAt is RFC3339 last activity, so a client can sort or say \"2h ago\".
|
|
PushedAt *string `json:"pushedAt,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGitlabProjectView ProviderGitlabProjectView
|
|
|
|
// NewProviderGitlabProjectView instantiates a new ProviderGitlabProjectView 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 NewProviderGitlabProjectView() *ProviderGitlabProjectView {
|
|
this := ProviderGitlabProjectView{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGitlabProjectViewWithDefaults instantiates a new ProviderGitlabProjectView 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 NewProviderGitlabProjectViewWithDefaults() *ProviderGitlabProjectView {
|
|
this := ProviderGitlabProjectView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCloneUrl returns the CloneUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetCloneUrl() string {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CloneUrl
|
|
}
|
|
|
|
// GetCloneUrlOk returns a tuple with the CloneUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetCloneUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
return nil, false
|
|
}
|
|
return o.CloneUrl, true
|
|
}
|
|
|
|
// HasCloneUrl returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasCloneUrl() bool {
|
|
if o != nil && !IsNil(o.CloneUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCloneUrl gets a reference to the given string and assigns it to the CloneUrl field.
|
|
func (o *ProviderGitlabProjectView) SetCloneUrl(v string) {
|
|
o.CloneUrl = &v
|
|
}
|
|
|
|
// GetDefaultBranch returns the DefaultBranch field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetDefaultBranch() string {
|
|
if o == nil || IsNil(o.DefaultBranch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DefaultBranch
|
|
}
|
|
|
|
// GetDefaultBranchOk returns a tuple with the DefaultBranch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetDefaultBranchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DefaultBranch) {
|
|
return nil, false
|
|
}
|
|
return o.DefaultBranch, true
|
|
}
|
|
|
|
// HasDefaultBranch returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasDefaultBranch() bool {
|
|
if o != nil && !IsNil(o.DefaultBranch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDefaultBranch gets a reference to the given string and assigns it to the DefaultBranch field.
|
|
func (o *ProviderGitlabProjectView) SetDefaultBranch(v string) {
|
|
o.DefaultBranch = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetFullName returns the FullName field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetFullName() string {
|
|
if o == nil || IsNil(o.FullName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FullName
|
|
}
|
|
|
|
// GetFullNameOk returns a tuple with the FullName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetFullNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FullName) {
|
|
return nil, false
|
|
}
|
|
return o.FullName, true
|
|
}
|
|
|
|
// HasFullName returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasFullName() bool {
|
|
if o != nil && !IsNil(o.FullName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFullName gets a reference to the given string and assigns it to the FullName field.
|
|
func (o *ProviderGitlabProjectView) SetFullName(v string) {
|
|
o.FullName = &v
|
|
}
|
|
|
|
// GetHtmlUrl returns the HtmlUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetHtmlUrl() string {
|
|
if o == nil || IsNil(o.HtmlUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.HtmlUrl
|
|
}
|
|
|
|
// GetHtmlUrlOk returns a tuple with the HtmlUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetHtmlUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.HtmlUrl) {
|
|
return nil, false
|
|
}
|
|
return o.HtmlUrl, true
|
|
}
|
|
|
|
// HasHtmlUrl returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasHtmlUrl() bool {
|
|
if o != nil && !IsNil(o.HtmlUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHtmlUrl gets a reference to the given string and assigns it to the HtmlUrl field.
|
|
func (o *ProviderGitlabProjectView) SetHtmlUrl(v string) {
|
|
o.HtmlUrl = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) 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 *ProviderGitlabProjectView) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPrivate returns the Private field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetPrivate() bool {
|
|
if o == nil || IsNil(o.Private) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Private
|
|
}
|
|
|
|
// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetPrivateOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Private) {
|
|
return nil, false
|
|
}
|
|
return o.Private, true
|
|
}
|
|
|
|
// HasPrivate returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasPrivate() bool {
|
|
if o != nil && !IsNil(o.Private) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrivate gets a reference to the given bool and assigns it to the Private field.
|
|
func (o *ProviderGitlabProjectView) SetPrivate(v bool) {
|
|
o.Private = &v
|
|
}
|
|
|
|
// GetPushedAt returns the PushedAt field value if set, zero value otherwise.
|
|
func (o *ProviderGitlabProjectView) GetPushedAt() string {
|
|
if o == nil || IsNil(o.PushedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PushedAt
|
|
}
|
|
|
|
// GetPushedAtOk returns a tuple with the PushedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGitlabProjectView) GetPushedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PushedAt) {
|
|
return nil, false
|
|
}
|
|
return o.PushedAt, true
|
|
}
|
|
|
|
// HasPushedAt returns a boolean if a field has been set.
|
|
func (o *ProviderGitlabProjectView) HasPushedAt() bool {
|
|
if o != nil && !IsNil(o.PushedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPushedAt gets a reference to the given string and assigns it to the PushedAt field.
|
|
func (o *ProviderGitlabProjectView) SetPushedAt(v string) {
|
|
o.PushedAt = &v
|
|
}
|
|
|
|
func (o ProviderGitlabProjectView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGitlabProjectView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CloneUrl) {
|
|
toSerialize["cloneUrl"] = o.CloneUrl
|
|
}
|
|
if !IsNil(o.DefaultBranch) {
|
|
toSerialize["defaultBranch"] = o.DefaultBranch
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.FullName) {
|
|
toSerialize["fullName"] = o.FullName
|
|
}
|
|
if !IsNil(o.HtmlUrl) {
|
|
toSerialize["htmlUrl"] = o.HtmlUrl
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Private) {
|
|
toSerialize["private"] = o.Private
|
|
}
|
|
if !IsNil(o.PushedAt) {
|
|
toSerialize["pushedAt"] = o.PushedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGitlabProjectView) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGitlabProjectView := _ProviderGitlabProjectView{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGitlabProjectView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGitlabProjectView(varProviderGitlabProjectView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "cloneUrl")
|
|
delete(additionalProperties, "defaultBranch")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "fullName")
|
|
delete(additionalProperties, "htmlUrl")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "private")
|
|
delete(additionalProperties, "pushedAt")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGitlabProjectView struct {
|
|
value *ProviderGitlabProjectView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGitlabProjectView) Get() *ProviderGitlabProjectView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGitlabProjectView) Set(val *ProviderGitlabProjectView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGitlabProjectView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGitlabProjectView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGitlabProjectView(val *ProviderGitlabProjectView) *NullableProviderGitlabProjectView {
|
|
return &NullableProviderGitlabProjectView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGitlabProjectView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGitlabProjectView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|