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 ProviderGithubRepoItem type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubRepoItem{}
|
|
|
|
// ProviderGithubRepoItem struct for ProviderGithubRepoItem
|
|
type ProviderGithubRepoItem struct {
|
|
// Codebase is the name it has in the org's code workspace once brought in (POST /v1/provider/github/repos/import): listed by GET /v1/git/repos when it is there.
|
|
Codebase *string `json:"codebase,omitempty"`
|
|
// DefaultBranch is the branch GitHub opens it on.
|
|
DefaultBranch *string `json:"default_branch,omitempty"`
|
|
// FullName is owner/name, the address a coding run, a branch listing and a deploy take.
|
|
FullName *string `json:"full_name,omitempty"`
|
|
// InstallationID is the installation of the Hanzo Platform App that reaches it — the grant a run on it is minted from.
|
|
InstallationId *int64 `json:"installation_id,omitempty"`
|
|
// Name is its name within that account.
|
|
Name *string `json:"name,omitempty"`
|
|
// Owner is the GitHub account that holds it.
|
|
Owner *string `json:"owner,omitempty"`
|
|
// Private is GitHub's visibility bit.
|
|
Private *bool `json:"private,omitempty"`
|
|
// PushedAt is when anything was last pushed to it, RFC 3339 UTC. Absent for a repository nothing was ever pushed to.
|
|
PushedAt *string `json:"pushed_at,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubRepoItem ProviderGithubRepoItem
|
|
|
|
// NewProviderGithubRepoItem instantiates a new ProviderGithubRepoItem 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 NewProviderGithubRepoItem() *ProviderGithubRepoItem {
|
|
this := ProviderGithubRepoItem{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubRepoItemWithDefaults instantiates a new ProviderGithubRepoItem 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 NewProviderGithubRepoItemWithDefaults() *ProviderGithubRepoItem {
|
|
this := ProviderGithubRepoItem{}
|
|
return &this
|
|
}
|
|
|
|
// GetCodebase returns the Codebase field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) GetCodebase() string {
|
|
if o == nil || IsNil(o.Codebase) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Codebase
|
|
}
|
|
|
|
// GetCodebaseOk returns a tuple with the Codebase field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubRepoItem) GetCodebaseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Codebase) {
|
|
return nil, false
|
|
}
|
|
return o.Codebase, true
|
|
}
|
|
|
|
// HasCodebase returns a boolean if a field has been set.
|
|
func (o *ProviderGithubRepoItem) HasCodebase() bool {
|
|
if o != nil && !IsNil(o.Codebase) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCodebase gets a reference to the given string and assigns it to the Codebase field.
|
|
func (o *ProviderGithubRepoItem) SetCodebase(v string) {
|
|
o.Codebase = &v
|
|
}
|
|
|
|
// GetDefaultBranch returns the DefaultBranch field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) SetDefaultBranch(v string) {
|
|
o.DefaultBranch = &v
|
|
}
|
|
|
|
// GetFullName returns the FullName field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) SetFullName(v string) {
|
|
o.FullName = &v
|
|
}
|
|
|
|
// GetInstallationId returns the InstallationId field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) GetInstallationId() int64 {
|
|
if o == nil || IsNil(o.InstallationId) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.InstallationId
|
|
}
|
|
|
|
// GetInstallationIdOk returns a tuple with the InstallationId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubRepoItem) GetInstallationIdOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.InstallationId) {
|
|
return nil, false
|
|
}
|
|
return o.InstallationId, true
|
|
}
|
|
|
|
// HasInstallationId returns a boolean if a field has been set.
|
|
func (o *ProviderGithubRepoItem) HasInstallationId() bool {
|
|
if o != nil && !IsNil(o.InstallationId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInstallationId gets a reference to the given int64 and assigns it to the InstallationId field.
|
|
func (o *ProviderGithubRepoItem) SetInstallationId(v int64) {
|
|
o.InstallationId = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubRepoItem) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *ProviderGithubRepoItem) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *ProviderGithubRepoItem) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPrivate returns the Private field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) SetPrivate(v bool) {
|
|
o.Private = &v
|
|
}
|
|
|
|
// GetPushedAt returns the PushedAt field value if set, zero value otherwise.
|
|
func (o *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) 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 *ProviderGithubRepoItem) SetPushedAt(v string) {
|
|
o.PushedAt = &v
|
|
}
|
|
|
|
func (o ProviderGithubRepoItem) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubRepoItem) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Codebase) {
|
|
toSerialize["codebase"] = o.Codebase
|
|
}
|
|
if !IsNil(o.DefaultBranch) {
|
|
toSerialize["default_branch"] = o.DefaultBranch
|
|
}
|
|
if !IsNil(o.FullName) {
|
|
toSerialize["full_name"] = o.FullName
|
|
}
|
|
if !IsNil(o.InstallationId) {
|
|
toSerialize["installation_id"] = o.InstallationId
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Private) {
|
|
toSerialize["private"] = o.Private
|
|
}
|
|
if !IsNil(o.PushedAt) {
|
|
toSerialize["pushed_at"] = o.PushedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubRepoItem) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubRepoItem := _ProviderGithubRepoItem{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubRepoItem)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubRepoItem(varProviderGithubRepoItem)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "codebase")
|
|
delete(additionalProperties, "default_branch")
|
|
delete(additionalProperties, "full_name")
|
|
delete(additionalProperties, "installation_id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "private")
|
|
delete(additionalProperties, "pushed_at")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubRepoItem struct {
|
|
value *ProviderGithubRepoItem
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubRepoItem) Get() *ProviderGithubRepoItem {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubRepoItem) Set(val *ProviderGithubRepoItem) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubRepoItem) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubRepoItem) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubRepoItem(val *ProviderGithubRepoItem) *NullableProviderGithubRepoItem {
|
|
return &NullableProviderGithubRepoItem{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubRepoItem) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubRepoItem) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|