// Code generated by ogen, DO NOT EDIT.
package gen
import (
"net/url"
"time"
"github.com/go-faster/errors"
)
type ActivityListReposStarredByUserDirection string
const (
ActivityListReposStarredByUserDirectionAsc ActivityListReposStarredByUserDirection = "asc"
ActivityListReposStarredByUserDirectionDesc ActivityListReposStarredByUserDirection = "desc"
)
// AllValues returns all ActivityListReposStarredByUserDirection values.
func (ActivityListReposStarredByUserDirection) AllValues() []ActivityListReposStarredByUserDirection {
return []ActivityListReposStarredByUserDirection{
ActivityListReposStarredByUserDirectionAsc,
ActivityListReposStarredByUserDirectionDesc,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ActivityListReposStarredByUserDirection) MarshalText() ([]byte, error) {
switch s {
case ActivityListReposStarredByUserDirectionAsc:
return []byte(s), nil
case ActivityListReposStarredByUserDirectionDesc:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ActivityListReposStarredByUserDirection) UnmarshalText(data []byte) error {
switch ActivityListReposStarredByUserDirection(data) {
case ActivityListReposStarredByUserDirectionAsc:
*s = ActivityListReposStarredByUserDirectionAsc
return nil
case ActivityListReposStarredByUserDirectionDesc:
*s = ActivityListReposStarredByUserDirectionDesc
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type ActivityListReposStarredByUserSort string
const (
ActivityListReposStarredByUserSortCreated ActivityListReposStarredByUserSort = "created"
ActivityListReposStarredByUserSortUpdated ActivityListReposStarredByUserSort = "updated"
)
// AllValues returns all ActivityListReposStarredByUserSort values.
func (ActivityListReposStarredByUserSort) AllValues() []ActivityListReposStarredByUserSort {
return []ActivityListReposStarredByUserSort{
ActivityListReposStarredByUserSortCreated,
ActivityListReposStarredByUserSortUpdated,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ActivityListReposStarredByUserSort) MarshalText() ([]byte, error) {
switch s {
case ActivityListReposStarredByUserSortCreated:
return []byte(s), nil
case ActivityListReposStarredByUserSortUpdated:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ActivityListReposStarredByUserSort) UnmarshalText(data []byte) error {
switch ActivityListReposStarredByUserSort(data) {
case ActivityListReposStarredByUserSortCreated:
*s = ActivityListReposStarredByUserSortCreated
return nil
case ActivityListReposStarredByUserSortUpdated:
*s = ActivityListReposStarredByUserSortUpdated
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type BearerAuth struct {
Token string
Roles []string
}
// GetToken returns the value of Token.
func (s *BearerAuth) GetToken() string {
return s.Token
}
// GetRoles returns the value of Roles.
func (s *BearerAuth) GetRoles() []string {
return s.Roles
}
// SetToken sets the value of Token.
func (s *BearerAuth) SetToken(val string) {
s.Token = val
}
// SetRoles sets the value of Roles.
func (s *BearerAuth) SetRoles(val []string) {
s.Roles = val
}
// Ref: #/components/schemas/Branch
type Branch struct {
Name string `json:"name"`
Protected OptBool `json:"protected"`
}
// GetName returns the value of Name.
func (s *Branch) GetName() string {
return s.Name
}
// GetProtected returns the value of Protected.
func (s *Branch) GetProtected() OptBool {
return s.Protected
}
// SetName sets the value of Name.
func (s *Branch) SetName(val string) {
s.Name = val
}
// SetProtected sets the value of Protected.
func (s *Branch) SetProtected(val OptBool) {
s.Protected = val
}
// Ref: #/components/schemas/Commit
type Commit struct {
Sha string `json:"sha"`
HTMLURL url.URL `json:"html_url"`
Commit OptCommitCommit `json:"commit"`
Author OptRepositoryOwner `json:"author"`
}
// GetSha returns the value of Sha.
func (s *Commit) GetSha() string {
return s.Sha
}
// GetHTMLURL returns the value of HTMLURL.
func (s *Commit) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetCommit returns the value of Commit.
func (s *Commit) GetCommit() OptCommitCommit {
return s.Commit
}
// GetAuthor returns the value of Author.
func (s *Commit) GetAuthor() OptRepositoryOwner {
return s.Author
}
// SetSha sets the value of Sha.
func (s *Commit) SetSha(val string) {
s.Sha = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *Commit) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetCommit sets the value of Commit.
func (s *Commit) SetCommit(val OptCommitCommit) {
s.Commit = val
}
// SetAuthor sets the value of Author.
func (s *Commit) SetAuthor(val OptRepositoryOwner) {
s.Author = val
}
type CommitCommit struct {
Message OptString `json:"message"`
Author OptCommitCommitAuthor `json:"author"`
}
// GetMessage returns the value of Message.
func (s *CommitCommit) GetMessage() OptString {
return s.Message
}
// GetAuthor returns the value of Author.
func (s *CommitCommit) GetAuthor() OptCommitCommitAuthor {
return s.Author
}
// SetMessage sets the value of Message.
func (s *CommitCommit) SetMessage(val OptString) {
s.Message = val
}
// SetAuthor sets the value of Author.
func (s *CommitCommit) SetAuthor(val OptCommitCommitAuthor) {
s.Author = val
}
type CommitCommitAuthor struct {
Name OptString `json:"name"`
Date OptDateTime `json:"date"`
}
// GetName returns the value of Name.
func (s *CommitCommitAuthor) GetName() OptString {
return s.Name
}
// GetDate returns the value of Date.
func (s *CommitCommitAuthor) GetDate() OptDateTime {
return s.Date
}
// SetName sets the value of Name.
func (s *CommitCommitAuthor) SetName(val OptString) {
s.Name = val
}
// SetDate sets the value of Date.
func (s *CommitCommitAuthor) SetDate(val OptDateTime) {
s.Date = val
}
// Ref: #/components/schemas/CreateCommentRequest
type CreateCommentRequest struct {
Body string `json:"body"`
}
// GetBody returns the value of Body.
func (s *CreateCommentRequest) GetBody() string {
return s.Body
}
// SetBody sets the value of Body.
func (s *CreateCommentRequest) SetBody(val string) {
s.Body = val
}
// Ref: #/components/schemas/CreateIssueRequest
type CreateIssueRequest struct {
Title string `json:"title"`
Body OptString `json:"body"`
Labels []string `json:"labels"`
Assignees []string `json:"assignees"`
}
// GetTitle returns the value of Title.
func (s *CreateIssueRequest) GetTitle() string {
return s.Title
}
// GetBody returns the value of Body.
func (s *CreateIssueRequest) GetBody() OptString {
return s.Body
}
// GetLabels returns the value of Labels.
func (s *CreateIssueRequest) GetLabels() []string {
return s.Labels
}
// GetAssignees returns the value of Assignees.
func (s *CreateIssueRequest) GetAssignees() []string {
return s.Assignees
}
// SetTitle sets the value of Title.
func (s *CreateIssueRequest) SetTitle(val string) {
s.Title = val
}
// SetBody sets the value of Body.
func (s *CreateIssueRequest) SetBody(val OptString) {
s.Body = val
}
// SetLabels sets the value of Labels.
func (s *CreateIssueRequest) SetLabels(val []string) {
s.Labels = val
}
// SetAssignees sets the value of Assignees.
func (s *CreateIssueRequest) SetAssignees(val []string) {
s.Assignees = val
}
// Ref: #/components/schemas/CreatePRRequest
type CreatePRRequest struct {
Title string `json:"title"`
Head string `json:"head"`
Base string `json:"base"`
Body OptString `json:"body"`
Draft OptBool `json:"draft"`
}
// GetTitle returns the value of Title.
func (s *CreatePRRequest) GetTitle() string {
return s.Title
}
// GetHead returns the value of Head.
func (s *CreatePRRequest) GetHead() string {
return s.Head
}
// GetBase returns the value of Base.
func (s *CreatePRRequest) GetBase() string {
return s.Base
}
// GetBody returns the value of Body.
func (s *CreatePRRequest) GetBody() OptString {
return s.Body
}
// GetDraft returns the value of Draft.
func (s *CreatePRRequest) GetDraft() OptBool {
return s.Draft
}
// SetTitle sets the value of Title.
func (s *CreatePRRequest) SetTitle(val string) {
s.Title = val
}
// SetHead sets the value of Head.
func (s *CreatePRRequest) SetHead(val string) {
s.Head = val
}
// SetBase sets the value of Base.
func (s *CreatePRRequest) SetBase(val string) {
s.Base = val
}
// SetBody sets the value of Body.
func (s *CreatePRRequest) SetBody(val OptString) {
s.Body = val
}
// SetDraft sets the value of Draft.
func (s *CreatePRRequest) SetDraft(val OptBool) {
s.Draft = val
}
// Ref: #/components/schemas/FileContent
type FileContent struct {
Name string `json:"name"`
Path string `json:"path"`
Sha OptString `json:"sha"`
Size OptInt `json:"size"`
Type string `json:"type"`
Content OptString `json:"content"`
Encoding OptString `json:"encoding"`
HTMLURL OptURI `json:"html_url"`
}
// GetName returns the value of Name.
func (s *FileContent) GetName() string {
return s.Name
}
// GetPath returns the value of Path.
func (s *FileContent) GetPath() string {
return s.Path
}
// GetSha returns the value of Sha.
func (s *FileContent) GetSha() OptString {
return s.Sha
}
// GetSize returns the value of Size.
func (s *FileContent) GetSize() OptInt {
return s.Size
}
// GetType returns the value of Type.
func (s *FileContent) GetType() string {
return s.Type
}
// GetContent returns the value of Content.
func (s *FileContent) GetContent() OptString {
return s.Content
}
// GetEncoding returns the value of Encoding.
func (s *FileContent) GetEncoding() OptString {
return s.Encoding
}
// GetHTMLURL returns the value of HTMLURL.
func (s *FileContent) GetHTMLURL() OptURI {
return s.HTMLURL
}
// SetName sets the value of Name.
func (s *FileContent) SetName(val string) {
s.Name = val
}
// SetPath sets the value of Path.
func (s *FileContent) SetPath(val string) {
s.Path = val
}
// SetSha sets the value of Sha.
func (s *FileContent) SetSha(val OptString) {
s.Sha = val
}
// SetSize sets the value of Size.
func (s *FileContent) SetSize(val OptInt) {
s.Size = val
}
// SetType sets the value of Type.
func (s *FileContent) SetType(val string) {
s.Type = val
}
// SetContent sets the value of Content.
func (s *FileContent) SetContent(val OptString) {
s.Content = val
}
// SetEncoding sets the value of Encoding.
func (s *FileContent) SetEncoding(val OptString) {
s.Encoding = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *FileContent) SetHTMLURL(val OptURI) {
s.HTMLURL = val
}
// Ref: #/components/schemas/Issue
type Issue struct {
ID int64 `json:"id"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Body OptNilString `json:"body"`
HTMLURL url.URL `json:"html_url"`
User OptIssueUser `json:"user"`
Labels []Label `json:"labels"`
Assignees []IssueUser `json:"assignees"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
ClosedAt OptNilDateTime `json:"closed_at"`
}
// GetID returns the value of ID.
func (s *Issue) GetID() int64 {
return s.ID
}
// GetNumber returns the value of Number.
func (s *Issue) GetNumber() int {
return s.Number
}
// GetTitle returns the value of Title.
func (s *Issue) GetTitle() string {
return s.Title
}
// GetState returns the value of State.
func (s *Issue) GetState() string {
return s.State
}
// GetBody returns the value of Body.
func (s *Issue) GetBody() OptNilString {
return s.Body
}
// GetHTMLURL returns the value of HTMLURL.
func (s *Issue) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetUser returns the value of User.
func (s *Issue) GetUser() OptIssueUser {
return s.User
}
// GetLabels returns the value of Labels.
func (s *Issue) GetLabels() []Label {
return s.Labels
}
// GetAssignees returns the value of Assignees.
func (s *Issue) GetAssignees() []IssueUser {
return s.Assignees
}
// GetCreatedAt returns the value of CreatedAt.
func (s *Issue) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *Issue) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// GetClosedAt returns the value of ClosedAt.
func (s *Issue) GetClosedAt() OptNilDateTime {
return s.ClosedAt
}
// SetID sets the value of ID.
func (s *Issue) SetID(val int64) {
s.ID = val
}
// SetNumber sets the value of Number.
func (s *Issue) SetNumber(val int) {
s.Number = val
}
// SetTitle sets the value of Title.
func (s *Issue) SetTitle(val string) {
s.Title = val
}
// SetState sets the value of State.
func (s *Issue) SetState(val string) {
s.State = val
}
// SetBody sets the value of Body.
func (s *Issue) SetBody(val OptNilString) {
s.Body = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *Issue) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetUser sets the value of User.
func (s *Issue) SetUser(val OptIssueUser) {
s.User = val
}
// SetLabels sets the value of Labels.
func (s *Issue) SetLabels(val []Label) {
s.Labels = val
}
// SetAssignees sets the value of Assignees.
func (s *Issue) SetAssignees(val []IssueUser) {
s.Assignees = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *Issue) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *Issue) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// SetClosedAt sets the value of ClosedAt.
func (s *Issue) SetClosedAt(val OptNilDateTime) {
s.ClosedAt = val
}
// Ref: #/components/schemas/IssueComment
type IssueComment struct {
ID int64 `json:"id"`
Body string `json:"body"`
HTMLURL url.URL `json:"html_url"`
User OptIssueUser `json:"user"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
// GetID returns the value of ID.
func (s *IssueComment) GetID() int64 {
return s.ID
}
// GetBody returns the value of Body.
func (s *IssueComment) GetBody() string {
return s.Body
}
// GetHTMLURL returns the value of HTMLURL.
func (s *IssueComment) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetUser returns the value of User.
func (s *IssueComment) GetUser() OptIssueUser {
return s.User
}
// GetCreatedAt returns the value of CreatedAt.
func (s *IssueComment) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *IssueComment) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// SetID sets the value of ID.
func (s *IssueComment) SetID(val int64) {
s.ID = val
}
// SetBody sets the value of Body.
func (s *IssueComment) SetBody(val string) {
s.Body = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *IssueComment) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetUser sets the value of User.
func (s *IssueComment) SetUser(val OptIssueUser) {
s.User = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *IssueComment) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *IssueComment) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// Ref: #/components/schemas/IssueUser
type IssueUser struct {
Login string `json:"login"`
ID int64 `json:"id"`
}
// GetLogin returns the value of Login.
func (s *IssueUser) GetLogin() string {
return s.Login
}
// GetID returns the value of ID.
func (s *IssueUser) GetID() int64 {
return s.ID
}
// SetLogin sets the value of Login.
func (s *IssueUser) SetLogin(val string) {
s.Login = val
}
// SetID sets the value of ID.
func (s *IssueUser) SetID(val int64) {
s.ID = val
}
type IssuesListForRepoState string
const (
IssuesListForRepoStateOpen IssuesListForRepoState = "open"
IssuesListForRepoStateClosed IssuesListForRepoState = "closed"
IssuesListForRepoStateAll IssuesListForRepoState = "all"
)
// AllValues returns all IssuesListForRepoState values.
func (IssuesListForRepoState) AllValues() []IssuesListForRepoState {
return []IssuesListForRepoState{
IssuesListForRepoStateOpen,
IssuesListForRepoStateClosed,
IssuesListForRepoStateAll,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s IssuesListForRepoState) MarshalText() ([]byte, error) {
switch s {
case IssuesListForRepoStateOpen:
return []byte(s), nil
case IssuesListForRepoStateClosed:
return []byte(s), nil
case IssuesListForRepoStateAll:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *IssuesListForRepoState) UnmarshalText(data []byte) error {
switch IssuesListForRepoState(data) {
case IssuesListForRepoStateOpen:
*s = IssuesListForRepoStateOpen
return nil
case IssuesListForRepoStateClosed:
*s = IssuesListForRepoStateClosed
return nil
case IssuesListForRepoStateAll:
*s = IssuesListForRepoStateAll
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/Label
type Label struct {
Name OptString `json:"name"`
Color OptString `json:"color"`
}
// GetName returns the value of Name.
func (s *Label) GetName() OptString {
return s.Name
}
// GetColor returns the value of Color.
func (s *Label) GetColor() OptString {
return s.Color
}
// SetName sets the value of Name.
func (s *Label) SetName(val OptString) {
s.Name = val
}
// SetColor sets the value of Color.
func (s *Label) SetColor(val OptString) {
s.Color = val
}
// NewOptActivityListReposStarredByUserDirection returns new OptActivityListReposStarredByUserDirection with value set to v.
func NewOptActivityListReposStarredByUserDirection(v ActivityListReposStarredByUserDirection) OptActivityListReposStarredByUserDirection {
return OptActivityListReposStarredByUserDirection{
Value: v,
Set: true,
}
}
// OptActivityListReposStarredByUserDirection is optional ActivityListReposStarredByUserDirection.
type OptActivityListReposStarredByUserDirection struct {
Value ActivityListReposStarredByUserDirection
Set bool
}
// IsSet returns true if OptActivityListReposStarredByUserDirection was set.
func (o OptActivityListReposStarredByUserDirection) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptActivityListReposStarredByUserDirection) Reset() {
var v ActivityListReposStarredByUserDirection
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptActivityListReposStarredByUserDirection) SetTo(v ActivityListReposStarredByUserDirection) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptActivityListReposStarredByUserDirection) Get() (v ActivityListReposStarredByUserDirection, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptActivityListReposStarredByUserDirection) Or(d ActivityListReposStarredByUserDirection) ActivityListReposStarredByUserDirection {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptActivityListReposStarredByUserSort returns new OptActivityListReposStarredByUserSort with value set to v.
func NewOptActivityListReposStarredByUserSort(v ActivityListReposStarredByUserSort) OptActivityListReposStarredByUserSort {
return OptActivityListReposStarredByUserSort{
Value: v,
Set: true,
}
}
// OptActivityListReposStarredByUserSort is optional ActivityListReposStarredByUserSort.
type OptActivityListReposStarredByUserSort struct {
Value ActivityListReposStarredByUserSort
Set bool
}
// IsSet returns true if OptActivityListReposStarredByUserSort was set.
func (o OptActivityListReposStarredByUserSort) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptActivityListReposStarredByUserSort) Reset() {
var v ActivityListReposStarredByUserSort
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptActivityListReposStarredByUserSort) SetTo(v ActivityListReposStarredByUserSort) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptActivityListReposStarredByUserSort) Get() (v ActivityListReposStarredByUserSort, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptActivityListReposStarredByUserSort) Or(d ActivityListReposStarredByUserSort) ActivityListReposStarredByUserSort {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptBool returns new OptBool with value set to v.
func NewOptBool(v bool) OptBool {
return OptBool{
Value: v,
Set: true,
}
}
// OptBool is optional bool.
type OptBool struct {
Value bool
Set bool
}
// IsSet returns true if OptBool was set.
func (o OptBool) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptBool) Reset() {
var v bool
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptBool) SetTo(v bool) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptBool) Get() (v bool, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptBool) Or(d bool) bool {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptCommitCommit returns new OptCommitCommit with value set to v.
func NewOptCommitCommit(v CommitCommit) OptCommitCommit {
return OptCommitCommit{
Value: v,
Set: true,
}
}
// OptCommitCommit is optional CommitCommit.
type OptCommitCommit struct {
Value CommitCommit
Set bool
}
// IsSet returns true if OptCommitCommit was set.
func (o OptCommitCommit) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptCommitCommit) Reset() {
var v CommitCommit
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptCommitCommit) SetTo(v CommitCommit) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptCommitCommit) Get() (v CommitCommit, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptCommitCommit) Or(d CommitCommit) CommitCommit {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptCommitCommitAuthor returns new OptCommitCommitAuthor with value set to v.
func NewOptCommitCommitAuthor(v CommitCommitAuthor) OptCommitCommitAuthor {
return OptCommitCommitAuthor{
Value: v,
Set: true,
}
}
// OptCommitCommitAuthor is optional CommitCommitAuthor.
type OptCommitCommitAuthor struct {
Value CommitCommitAuthor
Set bool
}
// IsSet returns true if OptCommitCommitAuthor was set.
func (o OptCommitCommitAuthor) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptCommitCommitAuthor) Reset() {
var v CommitCommitAuthor
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptCommitCommitAuthor) SetTo(v CommitCommitAuthor) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptCommitCommitAuthor) Get() (v CommitCommitAuthor, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptCommitCommitAuthor) Or(d CommitCommitAuthor) CommitCommitAuthor {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptDateTime returns new OptDateTime with value set to v.
func NewOptDateTime(v time.Time) OptDateTime {
return OptDateTime{
Value: v,
Set: true,
}
}
// OptDateTime is optional time.Time.
type OptDateTime struct {
Value time.Time
Set bool
}
// IsSet returns true if OptDateTime was set.
func (o OptDateTime) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptDateTime) Reset() {
var v time.Time
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptDateTime) SetTo(v time.Time) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptDateTime) Get() (v time.Time, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptDateTime) Or(d time.Time) time.Time {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptInt returns new OptInt with value set to v.
func NewOptInt(v int) OptInt {
return OptInt{
Value: v,
Set: true,
}
}
// OptInt is optional int.
type OptInt struct {
Value int
Set bool
}
// IsSet returns true if OptInt was set.
func (o OptInt) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptInt) Reset() {
var v int
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptInt) SetTo(v int) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptInt) Get() (v int, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptInt) Or(d int) int {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptIssueUser returns new OptIssueUser with value set to v.
func NewOptIssueUser(v IssueUser) OptIssueUser {
return OptIssueUser{
Value: v,
Set: true,
}
}
// OptIssueUser is optional IssueUser.
type OptIssueUser struct {
Value IssueUser
Set bool
}
// IsSet returns true if OptIssueUser was set.
func (o OptIssueUser) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptIssueUser) Reset() {
var v IssueUser
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptIssueUser) SetTo(v IssueUser) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptIssueUser) Get() (v IssueUser, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptIssueUser) Or(d IssueUser) IssueUser {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptIssuesListForRepoState returns new OptIssuesListForRepoState with value set to v.
func NewOptIssuesListForRepoState(v IssuesListForRepoState) OptIssuesListForRepoState {
return OptIssuesListForRepoState{
Value: v,
Set: true,
}
}
// OptIssuesListForRepoState is optional IssuesListForRepoState.
type OptIssuesListForRepoState struct {
Value IssuesListForRepoState
Set bool
}
// IsSet returns true if OptIssuesListForRepoState was set.
func (o OptIssuesListForRepoState) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptIssuesListForRepoState) Reset() {
var v IssuesListForRepoState
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptIssuesListForRepoState) SetTo(v IssuesListForRepoState) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptIssuesListForRepoState) Get() (v IssuesListForRepoState, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptIssuesListForRepoState) Or(d IssuesListForRepoState) IssuesListForRepoState {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptNilDateTime returns new OptNilDateTime with value set to v.
func NewOptNilDateTime(v time.Time) OptNilDateTime {
return OptNilDateTime{
Value: v,
Set: true,
}
}
// OptNilDateTime is optional nullable time.Time.
type OptNilDateTime struct {
Value time.Time
Set bool
Null bool
}
// IsSet returns true if OptNilDateTime was set.
func (o OptNilDateTime) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptNilDateTime) Reset() {
var v time.Time
o.Value = v
o.Set = false
o.Null = false
}
// SetTo sets value to v.
func (o *OptNilDateTime) SetTo(v time.Time) {
o.Set = true
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o OptNilDateTime) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *OptNilDateTime) SetToNull() {
o.Set = true
o.Null = true
var v time.Time
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptNilDateTime) Get() (v time.Time, ok bool) {
if o.Null {
return v, false
}
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptNilDateTime) Or(d time.Time) time.Time {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptNilString returns new OptNilString with value set to v.
func NewOptNilString(v string) OptNilString {
return OptNilString{
Value: v,
Set: true,
}
}
// OptNilString is optional nullable string.
type OptNilString struct {
Value string
Set bool
Null bool
}
// IsSet returns true if OptNilString was set.
func (o OptNilString) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptNilString) Reset() {
var v string
o.Value = v
o.Set = false
o.Null = false
}
// SetTo sets value to v.
func (o *OptNilString) SetTo(v string) {
o.Set = true
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o OptNilString) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *OptNilString) SetToNull() {
o.Set = true
o.Null = true
var v string
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptNilString) Get() (v string, ok bool) {
if o.Null {
return v, false
}
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptNilString) Or(d string) string {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptPublicEventRepo returns new OptPublicEventRepo with value set to v.
func NewOptPublicEventRepo(v PublicEventRepo) OptPublicEventRepo {
return OptPublicEventRepo{
Value: v,
Set: true,
}
}
// OptPublicEventRepo is optional PublicEventRepo.
type OptPublicEventRepo struct {
Value PublicEventRepo
Set bool
}
// IsSet returns true if OptPublicEventRepo was set.
func (o OptPublicEventRepo) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptPublicEventRepo) Reset() {
var v PublicEventRepo
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptPublicEventRepo) SetTo(v PublicEventRepo) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptPublicEventRepo) Get() (v PublicEventRepo, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptPublicEventRepo) Or(d PublicEventRepo) PublicEventRepo {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptPullRequestBase returns new OptPullRequestBase with value set to v.
func NewOptPullRequestBase(v PullRequestBase) OptPullRequestBase {
return OptPullRequestBase{
Value: v,
Set: true,
}
}
// OptPullRequestBase is optional PullRequestBase.
type OptPullRequestBase struct {
Value PullRequestBase
Set bool
}
// IsSet returns true if OptPullRequestBase was set.
func (o OptPullRequestBase) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptPullRequestBase) Reset() {
var v PullRequestBase
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptPullRequestBase) SetTo(v PullRequestBase) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptPullRequestBase) Get() (v PullRequestBase, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptPullRequestBase) Or(d PullRequestBase) PullRequestBase {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptPullRequestHead returns new OptPullRequestHead with value set to v.
func NewOptPullRequestHead(v PullRequestHead) OptPullRequestHead {
return OptPullRequestHead{
Value: v,
Set: true,
}
}
// OptPullRequestHead is optional PullRequestHead.
type OptPullRequestHead struct {
Value PullRequestHead
Set bool
}
// IsSet returns true if OptPullRequestHead was set.
func (o OptPullRequestHead) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptPullRequestHead) Reset() {
var v PullRequestHead
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptPullRequestHead) SetTo(v PullRequestHead) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptPullRequestHead) Get() (v PullRequestHead, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptPullRequestHead) Or(d PullRequestHead) PullRequestHead {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptPullsListForRepoState returns new OptPullsListForRepoState with value set to v.
func NewOptPullsListForRepoState(v PullsListForRepoState) OptPullsListForRepoState {
return OptPullsListForRepoState{
Value: v,
Set: true,
}
}
// OptPullsListForRepoState is optional PullsListForRepoState.
type OptPullsListForRepoState struct {
Value PullsListForRepoState
Set bool
}
// IsSet returns true if OptPullsListForRepoState was set.
func (o OptPullsListForRepoState) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptPullsListForRepoState) Reset() {
var v PullsListForRepoState
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptPullsListForRepoState) SetTo(v PullsListForRepoState) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptPullsListForRepoState) Get() (v PullsListForRepoState, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptPullsListForRepoState) Or(d PullsListForRepoState) PullsListForRepoState {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptReposListForUserDirection returns new OptReposListForUserDirection with value set to v.
func NewOptReposListForUserDirection(v ReposListForUserDirection) OptReposListForUserDirection {
return OptReposListForUserDirection{
Value: v,
Set: true,
}
}
// OptReposListForUserDirection is optional ReposListForUserDirection.
type OptReposListForUserDirection struct {
Value ReposListForUserDirection
Set bool
}
// IsSet returns true if OptReposListForUserDirection was set.
func (o OptReposListForUserDirection) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptReposListForUserDirection) Reset() {
var v ReposListForUserDirection
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptReposListForUserDirection) SetTo(v ReposListForUserDirection) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptReposListForUserDirection) Get() (v ReposListForUserDirection, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptReposListForUserDirection) Or(d ReposListForUserDirection) ReposListForUserDirection {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptReposListForUserSort returns new OptReposListForUserSort with value set to v.
func NewOptReposListForUserSort(v ReposListForUserSort) OptReposListForUserSort {
return OptReposListForUserSort{
Value: v,
Set: true,
}
}
// OptReposListForUserSort is optional ReposListForUserSort.
type OptReposListForUserSort struct {
Value ReposListForUserSort
Set bool
}
// IsSet returns true if OptReposListForUserSort was set.
func (o OptReposListForUserSort) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptReposListForUserSort) Reset() {
var v ReposListForUserSort
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptReposListForUserSort) SetTo(v ReposListForUserSort) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptReposListForUserSort) Get() (v ReposListForUserSort, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptReposListForUserSort) Or(d ReposListForUserSort) ReposListForUserSort {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptReposListForUserType returns new OptReposListForUserType with value set to v.
func NewOptReposListForUserType(v ReposListForUserType) OptReposListForUserType {
return OptReposListForUserType{
Value: v,
Set: true,
}
}
// OptReposListForUserType is optional ReposListForUserType.
type OptReposListForUserType struct {
Value ReposListForUserType
Set bool
}
// IsSet returns true if OptReposListForUserType was set.
func (o OptReposListForUserType) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptReposListForUserType) Reset() {
var v ReposListForUserType
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptReposListForUserType) SetTo(v ReposListForUserType) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptReposListForUserType) Get() (v ReposListForUserType, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptReposListForUserType) Or(d ReposListForUserType) ReposListForUserType {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptRepository returns new OptRepository with value set to v.
func NewOptRepository(v Repository) OptRepository {
return OptRepository{
Value: v,
Set: true,
}
}
// OptRepository is optional Repository.
type OptRepository struct {
Value Repository
Set bool
}
// IsSet returns true if OptRepository was set.
func (o OptRepository) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptRepository) Reset() {
var v Repository
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptRepository) SetTo(v Repository) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptRepository) Get() (v Repository, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptRepository) Or(d Repository) Repository {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptRepositoryOwner returns new OptRepositoryOwner with value set to v.
func NewOptRepositoryOwner(v RepositoryOwner) OptRepositoryOwner {
return OptRepositoryOwner{
Value: v,
Set: true,
}
}
// OptRepositoryOwner is optional RepositoryOwner.
type OptRepositoryOwner struct {
Value RepositoryOwner
Set bool
}
// IsSet returns true if OptRepositoryOwner was set.
func (o OptRepositoryOwner) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptRepositoryOwner) Reset() {
var v RepositoryOwner
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptRepositoryOwner) SetTo(v RepositoryOwner) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptRepositoryOwner) Get() (v RepositoryOwner, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptRepositoryOwner) Or(d RepositoryOwner) RepositoryOwner {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptString returns new OptString with value set to v.
func NewOptString(v string) OptString {
return OptString{
Value: v,
Set: true,
}
}
// OptString is optional string.
type OptString struct {
Value string
Set bool
}
// IsSet returns true if OptString was set.
func (o OptString) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptString) Reset() {
var v string
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptString) SetTo(v string) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptString) Get() (v string, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptString) Or(d string) string {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptURI returns new OptURI with value set to v.
func NewOptURI(v url.URL) OptURI {
return OptURI{
Value: v,
Set: true,
}
}
// OptURI is optional url.URL.
type OptURI struct {
Value url.URL
Set bool
}
// IsSet returns true if OptURI was set.
func (o OptURI) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptURI) Reset() {
var v url.URL
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptURI) SetTo(v url.URL) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptURI) Get() (v url.URL, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptURI) Or(d url.URL) url.URL {
if v, ok := o.Get(); ok {
return v
}
return d
}
// Ref: #/components/schemas/Organization
type Organization struct {
Login string `json:"login"`
ID int64 `json:"id"`
Description OptNilString `json:"description"`
AvatarURL OptURI `json:"avatar_url"`
}
// GetLogin returns the value of Login.
func (s *Organization) GetLogin() string {
return s.Login
}
// GetID returns the value of ID.
func (s *Organization) GetID() int64 {
return s.ID
}
// GetDescription returns the value of Description.
func (s *Organization) GetDescription() OptNilString {
return s.Description
}
// GetAvatarURL returns the value of AvatarURL.
func (s *Organization) GetAvatarURL() OptURI {
return s.AvatarURL
}
// SetLogin sets the value of Login.
func (s *Organization) SetLogin(val string) {
s.Login = val
}
// SetID sets the value of ID.
func (s *Organization) SetID(val int64) {
s.ID = val
}
// SetDescription sets the value of Description.
func (s *Organization) SetDescription(val OptNilString) {
s.Description = val
}
// SetAvatarURL sets the value of AvatarURL.
func (s *Organization) SetAvatarURL(val OptURI) {
s.AvatarURL = val
}
// Ref: #/components/schemas/PublicEvent
type PublicEvent struct {
ID string `json:"id"`
Type string `json:"type"`
Repo OptPublicEventRepo `json:"repo"`
CreatedAt OptDateTime `json:"created_at"`
}
// GetID returns the value of ID.
func (s *PublicEvent) GetID() string {
return s.ID
}
// GetType returns the value of Type.
func (s *PublicEvent) GetType() string {
return s.Type
}
// GetRepo returns the value of Repo.
func (s *PublicEvent) GetRepo() OptPublicEventRepo {
return s.Repo
}
// GetCreatedAt returns the value of CreatedAt.
func (s *PublicEvent) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// SetID sets the value of ID.
func (s *PublicEvent) SetID(val string) {
s.ID = val
}
// SetType sets the value of Type.
func (s *PublicEvent) SetType(val string) {
s.Type = val
}
// SetRepo sets the value of Repo.
func (s *PublicEvent) SetRepo(val OptPublicEventRepo) {
s.Repo = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *PublicEvent) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
type PublicEventRepo struct {
Name OptString `json:"name"`
}
// GetName returns the value of Name.
func (s *PublicEventRepo) GetName() OptString {
return s.Name
}
// SetName sets the value of Name.
func (s *PublicEventRepo) SetName(val OptString) {
s.Name = val
}
// Ref: #/components/schemas/PullRequest
type PullRequest struct {
ID int64 `json:"id"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Body OptNilString `json:"body"`
HTMLURL url.URL `json:"html_url"`
User OptIssueUser `json:"user"`
Draft OptBool `json:"draft"`
Merged OptBool `json:"merged"`
Head OptPullRequestHead `json:"head"`
Base OptPullRequestBase `json:"base"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
MergedAt OptNilDateTime `json:"merged_at"`
}
// GetID returns the value of ID.
func (s *PullRequest) GetID() int64 {
return s.ID
}
// GetNumber returns the value of Number.
func (s *PullRequest) GetNumber() int {
return s.Number
}
// GetTitle returns the value of Title.
func (s *PullRequest) GetTitle() string {
return s.Title
}
// GetState returns the value of State.
func (s *PullRequest) GetState() string {
return s.State
}
// GetBody returns the value of Body.
func (s *PullRequest) GetBody() OptNilString {
return s.Body
}
// GetHTMLURL returns the value of HTMLURL.
func (s *PullRequest) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetUser returns the value of User.
func (s *PullRequest) GetUser() OptIssueUser {
return s.User
}
// GetDraft returns the value of Draft.
func (s *PullRequest) GetDraft() OptBool {
return s.Draft
}
// GetMerged returns the value of Merged.
func (s *PullRequest) GetMerged() OptBool {
return s.Merged
}
// GetHead returns the value of Head.
func (s *PullRequest) GetHead() OptPullRequestHead {
return s.Head
}
// GetBase returns the value of Base.
func (s *PullRequest) GetBase() OptPullRequestBase {
return s.Base
}
// GetCreatedAt returns the value of CreatedAt.
func (s *PullRequest) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *PullRequest) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// GetMergedAt returns the value of MergedAt.
func (s *PullRequest) GetMergedAt() OptNilDateTime {
return s.MergedAt
}
// SetID sets the value of ID.
func (s *PullRequest) SetID(val int64) {
s.ID = val
}
// SetNumber sets the value of Number.
func (s *PullRequest) SetNumber(val int) {
s.Number = val
}
// SetTitle sets the value of Title.
func (s *PullRequest) SetTitle(val string) {
s.Title = val
}
// SetState sets the value of State.
func (s *PullRequest) SetState(val string) {
s.State = val
}
// SetBody sets the value of Body.
func (s *PullRequest) SetBody(val OptNilString) {
s.Body = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *PullRequest) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetUser sets the value of User.
func (s *PullRequest) SetUser(val OptIssueUser) {
s.User = val
}
// SetDraft sets the value of Draft.
func (s *PullRequest) SetDraft(val OptBool) {
s.Draft = val
}
// SetMerged sets the value of Merged.
func (s *PullRequest) SetMerged(val OptBool) {
s.Merged = val
}
// SetHead sets the value of Head.
func (s *PullRequest) SetHead(val OptPullRequestHead) {
s.Head = val
}
// SetBase sets the value of Base.
func (s *PullRequest) SetBase(val OptPullRequestBase) {
s.Base = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *PullRequest) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *PullRequest) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// SetMergedAt sets the value of MergedAt.
func (s *PullRequest) SetMergedAt(val OptNilDateTime) {
s.MergedAt = val
}
type PullRequestBase struct {
Ref OptString `json:"ref"`
Sha OptString `json:"sha"`
}
// GetRef returns the value of Ref.
func (s *PullRequestBase) GetRef() OptString {
return s.Ref
}
// GetSha returns the value of Sha.
func (s *PullRequestBase) GetSha() OptString {
return s.Sha
}
// SetRef sets the value of Ref.
func (s *PullRequestBase) SetRef(val OptString) {
s.Ref = val
}
// SetSha sets the value of Sha.
func (s *PullRequestBase) SetSha(val OptString) {
s.Sha = val
}
// Ref: #/components/schemas/PullRequestFile
type PullRequestFile struct {
Sha OptString `json:"sha"`
Filename string `json:"filename"`
Status string `json:"status"`
Additions OptInt `json:"additions"`
Deletions OptInt `json:"deletions"`
Changes OptInt `json:"changes"`
Patch OptString `json:"patch"`
}
// GetSha returns the value of Sha.
func (s *PullRequestFile) GetSha() OptString {
return s.Sha
}
// GetFilename returns the value of Filename.
func (s *PullRequestFile) GetFilename() string {
return s.Filename
}
// GetStatus returns the value of Status.
func (s *PullRequestFile) GetStatus() string {
return s.Status
}
// GetAdditions returns the value of Additions.
func (s *PullRequestFile) GetAdditions() OptInt {
return s.Additions
}
// GetDeletions returns the value of Deletions.
func (s *PullRequestFile) GetDeletions() OptInt {
return s.Deletions
}
// GetChanges returns the value of Changes.
func (s *PullRequestFile) GetChanges() OptInt {
return s.Changes
}
// GetPatch returns the value of Patch.
func (s *PullRequestFile) GetPatch() OptString {
return s.Patch
}
// SetSha sets the value of Sha.
func (s *PullRequestFile) SetSha(val OptString) {
s.Sha = val
}
// SetFilename sets the value of Filename.
func (s *PullRequestFile) SetFilename(val string) {
s.Filename = val
}
// SetStatus sets the value of Status.
func (s *PullRequestFile) SetStatus(val string) {
s.Status = val
}
// SetAdditions sets the value of Additions.
func (s *PullRequestFile) SetAdditions(val OptInt) {
s.Additions = val
}
// SetDeletions sets the value of Deletions.
func (s *PullRequestFile) SetDeletions(val OptInt) {
s.Deletions = val
}
// SetChanges sets the value of Changes.
func (s *PullRequestFile) SetChanges(val OptInt) {
s.Changes = val
}
// SetPatch sets the value of Patch.
func (s *PullRequestFile) SetPatch(val OptString) {
s.Patch = val
}
type PullRequestHead struct {
Ref OptString `json:"ref"`
Sha OptString `json:"sha"`
}
// GetRef returns the value of Ref.
func (s *PullRequestHead) GetRef() OptString {
return s.Ref
}
// GetSha returns the value of Sha.
func (s *PullRequestHead) GetSha() OptString {
return s.Sha
}
// SetRef sets the value of Ref.
func (s *PullRequestHead) SetRef(val OptString) {
s.Ref = val
}
// SetSha sets the value of Sha.
func (s *PullRequestHead) SetSha(val OptString) {
s.Sha = val
}
type PullsListForRepoState string
const (
PullsListForRepoStateOpen PullsListForRepoState = "open"
PullsListForRepoStateClosed PullsListForRepoState = "closed"
PullsListForRepoStateAll PullsListForRepoState = "all"
)
// AllValues returns all PullsListForRepoState values.
func (PullsListForRepoState) AllValues() []PullsListForRepoState {
return []PullsListForRepoState{
PullsListForRepoStateOpen,
PullsListForRepoStateClosed,
PullsListForRepoStateAll,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s PullsListForRepoState) MarshalText() ([]byte, error) {
switch s {
case PullsListForRepoStateOpen:
return []byte(s), nil
case PullsListForRepoStateClosed:
return []byte(s), nil
case PullsListForRepoStateAll:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *PullsListForRepoState) UnmarshalText(data []byte) error {
switch PullsListForRepoState(data) {
case PullsListForRepoStateOpen:
*s = PullsListForRepoStateOpen
return nil
case PullsListForRepoStateClosed:
*s = PullsListForRepoStateClosed
return nil
case PullsListForRepoStateAll:
*s = PullsListForRepoStateAll
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type ReposListForUserDirection string
const (
ReposListForUserDirectionAsc ReposListForUserDirection = "asc"
ReposListForUserDirectionDesc ReposListForUserDirection = "desc"
)
// AllValues returns all ReposListForUserDirection values.
func (ReposListForUserDirection) AllValues() []ReposListForUserDirection {
return []ReposListForUserDirection{
ReposListForUserDirectionAsc,
ReposListForUserDirectionDesc,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ReposListForUserDirection) MarshalText() ([]byte, error) {
switch s {
case ReposListForUserDirectionAsc:
return []byte(s), nil
case ReposListForUserDirectionDesc:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ReposListForUserDirection) UnmarshalText(data []byte) error {
switch ReposListForUserDirection(data) {
case ReposListForUserDirectionAsc:
*s = ReposListForUserDirectionAsc
return nil
case ReposListForUserDirectionDesc:
*s = ReposListForUserDirectionDesc
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type ReposListForUserSort string
const (
ReposListForUserSortCreated ReposListForUserSort = "created"
ReposListForUserSortUpdated ReposListForUserSort = "updated"
ReposListForUserSortPushed ReposListForUserSort = "pushed"
ReposListForUserSortFullName ReposListForUserSort = "full_name"
)
// AllValues returns all ReposListForUserSort values.
func (ReposListForUserSort) AllValues() []ReposListForUserSort {
return []ReposListForUserSort{
ReposListForUserSortCreated,
ReposListForUserSortUpdated,
ReposListForUserSortPushed,
ReposListForUserSortFullName,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ReposListForUserSort) MarshalText() ([]byte, error) {
switch s {
case ReposListForUserSortCreated:
return []byte(s), nil
case ReposListForUserSortUpdated:
return []byte(s), nil
case ReposListForUserSortPushed:
return []byte(s), nil
case ReposListForUserSortFullName:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ReposListForUserSort) UnmarshalText(data []byte) error {
switch ReposListForUserSort(data) {
case ReposListForUserSortCreated:
*s = ReposListForUserSortCreated
return nil
case ReposListForUserSortUpdated:
*s = ReposListForUserSortUpdated
return nil
case ReposListForUserSortPushed:
*s = ReposListForUserSortPushed
return nil
case ReposListForUserSortFullName:
*s = ReposListForUserSortFullName
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type ReposListForUserType string
const (
ReposListForUserTypeAll ReposListForUserType = "all"
ReposListForUserTypeOwner ReposListForUserType = "owner"
ReposListForUserTypeMember ReposListForUserType = "member"
)
// AllValues returns all ReposListForUserType values.
func (ReposListForUserType) AllValues() []ReposListForUserType {
return []ReposListForUserType{
ReposListForUserTypeAll,
ReposListForUserTypeOwner,
ReposListForUserTypeMember,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ReposListForUserType) MarshalText() ([]byte, error) {
switch s {
case ReposListForUserTypeAll:
return []byte(s), nil
case ReposListForUserTypeOwner:
return []byte(s), nil
case ReposListForUserTypeMember:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ReposListForUserType) UnmarshalText(data []byte) error {
switch ReposListForUserType(data) {
case ReposListForUserTypeAll:
*s = ReposListForUserTypeAll
return nil
case ReposListForUserTypeOwner:
*s = ReposListForUserTypeOwner
return nil
case ReposListForUserTypeMember:
*s = ReposListForUserTypeMember
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/Repository
type Repository struct {
ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
Description OptNilString `json:"description"`
Private bool `json:"private"`
HTMLURL url.URL `json:"html_url"`
Owner RepositoryOwner `json:"owner"`
Fork OptBool `json:"fork"`
Language OptNilString `json:"language"`
StargazersCount OptInt `json:"stargazers_count"`
WatchersCount OptInt `json:"watchers_count"`
ForksCount OptInt `json:"forks_count"`
OpenIssuesCount OptInt `json:"open_issues_count"`
DefaultBranch OptString `json:"default_branch"`
Topics []string `json:"topics"`
Archived OptBool `json:"archived"`
Disabled OptBool `json:"disabled"`
Visibility OptString `json:"visibility"`
PushedAt OptNilDateTime `json:"pushed_at"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
// GetID returns the value of ID.
func (s *Repository) GetID() int64 {
return s.ID
}
// GetName returns the value of Name.
func (s *Repository) GetName() string {
return s.Name
}
// GetFullName returns the value of FullName.
func (s *Repository) GetFullName() string {
return s.FullName
}
// GetDescription returns the value of Description.
func (s *Repository) GetDescription() OptNilString {
return s.Description
}
// GetPrivate returns the value of Private.
func (s *Repository) GetPrivate() bool {
return s.Private
}
// GetHTMLURL returns the value of HTMLURL.
func (s *Repository) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetOwner returns the value of Owner.
func (s *Repository) GetOwner() RepositoryOwner {
return s.Owner
}
// GetFork returns the value of Fork.
func (s *Repository) GetFork() OptBool {
return s.Fork
}
// GetLanguage returns the value of Language.
func (s *Repository) GetLanguage() OptNilString {
return s.Language
}
// GetStargazersCount returns the value of StargazersCount.
func (s *Repository) GetStargazersCount() OptInt {
return s.StargazersCount
}
// GetWatchersCount returns the value of WatchersCount.
func (s *Repository) GetWatchersCount() OptInt {
return s.WatchersCount
}
// GetForksCount returns the value of ForksCount.
func (s *Repository) GetForksCount() OptInt {
return s.ForksCount
}
// GetOpenIssuesCount returns the value of OpenIssuesCount.
func (s *Repository) GetOpenIssuesCount() OptInt {
return s.OpenIssuesCount
}
// GetDefaultBranch returns the value of DefaultBranch.
func (s *Repository) GetDefaultBranch() OptString {
return s.DefaultBranch
}
// GetTopics returns the value of Topics.
func (s *Repository) GetTopics() []string {
return s.Topics
}
// GetArchived returns the value of Archived.
func (s *Repository) GetArchived() OptBool {
return s.Archived
}
// GetDisabled returns the value of Disabled.
func (s *Repository) GetDisabled() OptBool {
return s.Disabled
}
// GetVisibility returns the value of Visibility.
func (s *Repository) GetVisibility() OptString {
return s.Visibility
}
// GetPushedAt returns the value of PushedAt.
func (s *Repository) GetPushedAt() OptNilDateTime {
return s.PushedAt
}
// GetCreatedAt returns the value of CreatedAt.
func (s *Repository) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *Repository) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// SetID sets the value of ID.
func (s *Repository) SetID(val int64) {
s.ID = val
}
// SetName sets the value of Name.
func (s *Repository) SetName(val string) {
s.Name = val
}
// SetFullName sets the value of FullName.
func (s *Repository) SetFullName(val string) {
s.FullName = val
}
// SetDescription sets the value of Description.
func (s *Repository) SetDescription(val OptNilString) {
s.Description = val
}
// SetPrivate sets the value of Private.
func (s *Repository) SetPrivate(val bool) {
s.Private = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *Repository) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetOwner sets the value of Owner.
func (s *Repository) SetOwner(val RepositoryOwner) {
s.Owner = val
}
// SetFork sets the value of Fork.
func (s *Repository) SetFork(val OptBool) {
s.Fork = val
}
// SetLanguage sets the value of Language.
func (s *Repository) SetLanguage(val OptNilString) {
s.Language = val
}
// SetStargazersCount sets the value of StargazersCount.
func (s *Repository) SetStargazersCount(val OptInt) {
s.StargazersCount = val
}
// SetWatchersCount sets the value of WatchersCount.
func (s *Repository) SetWatchersCount(val OptInt) {
s.WatchersCount = val
}
// SetForksCount sets the value of ForksCount.
func (s *Repository) SetForksCount(val OptInt) {
s.ForksCount = val
}
// SetOpenIssuesCount sets the value of OpenIssuesCount.
func (s *Repository) SetOpenIssuesCount(val OptInt) {
s.OpenIssuesCount = val
}
// SetDefaultBranch sets the value of DefaultBranch.
func (s *Repository) SetDefaultBranch(val OptString) {
s.DefaultBranch = val
}
// SetTopics sets the value of Topics.
func (s *Repository) SetTopics(val []string) {
s.Topics = val
}
// SetArchived sets the value of Archived.
func (s *Repository) SetArchived(val OptBool) {
s.Archived = val
}
// SetDisabled sets the value of Disabled.
func (s *Repository) SetDisabled(val OptBool) {
s.Disabled = val
}
// SetVisibility sets the value of Visibility.
func (s *Repository) SetVisibility(val OptString) {
s.Visibility = val
}
// SetPushedAt sets the value of PushedAt.
func (s *Repository) SetPushedAt(val OptNilDateTime) {
s.PushedAt = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *Repository) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *Repository) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// Ref: #/components/schemas/RepositoryOwner
type RepositoryOwner struct {
Login string `json:"login"`
ID int64 `json:"id"`
AvatarURL OptURI `json:"avatar_url"`
HTMLURL OptURI `json:"html_url"`
Type OptString `json:"type"`
}
// GetLogin returns the value of Login.
func (s *RepositoryOwner) GetLogin() string {
return s.Login
}
// GetID returns the value of ID.
func (s *RepositoryOwner) GetID() int64 {
return s.ID
}
// GetAvatarURL returns the value of AvatarURL.
func (s *RepositoryOwner) GetAvatarURL() OptURI {
return s.AvatarURL
}
// GetHTMLURL returns the value of HTMLURL.
func (s *RepositoryOwner) GetHTMLURL() OptURI {
return s.HTMLURL
}
// GetType returns the value of Type.
func (s *RepositoryOwner) GetType() OptString {
return s.Type
}
// SetLogin sets the value of Login.
func (s *RepositoryOwner) SetLogin(val string) {
s.Login = val
}
// SetID sets the value of ID.
func (s *RepositoryOwner) SetID(val int64) {
s.ID = val
}
// SetAvatarURL sets the value of AvatarURL.
func (s *RepositoryOwner) SetAvatarURL(val OptURI) {
s.AvatarURL = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *RepositoryOwner) SetHTMLURL(val OptURI) {
s.HTMLURL = val
}
// SetType sets the value of Type.
func (s *RepositoryOwner) SetType(val OptString) {
s.Type = val
}
// Ref: #/components/schemas/SearchResultCode
type SearchResultCode struct {
TotalCount int `json:"total_count"`
IncompleteResults OptBool `json:"incomplete_results"`
Items []SearchResultCodeItemsItem `json:"items"`
}
// GetTotalCount returns the value of TotalCount.
func (s *SearchResultCode) GetTotalCount() int {
return s.TotalCount
}
// GetIncompleteResults returns the value of IncompleteResults.
func (s *SearchResultCode) GetIncompleteResults() OptBool {
return s.IncompleteResults
}
// GetItems returns the value of Items.
func (s *SearchResultCode) GetItems() []SearchResultCodeItemsItem {
return s.Items
}
// SetTotalCount sets the value of TotalCount.
func (s *SearchResultCode) SetTotalCount(val int) {
s.TotalCount = val
}
// SetIncompleteResults sets the value of IncompleteResults.
func (s *SearchResultCode) SetIncompleteResults(val OptBool) {
s.IncompleteResults = val
}
// SetItems sets the value of Items.
func (s *SearchResultCode) SetItems(val []SearchResultCodeItemsItem) {
s.Items = val
}
type SearchResultCodeItemsItem struct {
Name OptString `json:"name"`
Path OptString `json:"path"`
Sha OptString `json:"sha"`
HTMLURL OptURI `json:"html_url"`
Repository OptRepository `json:"repository"`
}
// GetName returns the value of Name.
func (s *SearchResultCodeItemsItem) GetName() OptString {
return s.Name
}
// GetPath returns the value of Path.
func (s *SearchResultCodeItemsItem) GetPath() OptString {
return s.Path
}
// GetSha returns the value of Sha.
func (s *SearchResultCodeItemsItem) GetSha() OptString {
return s.Sha
}
// GetHTMLURL returns the value of HTMLURL.
func (s *SearchResultCodeItemsItem) GetHTMLURL() OptURI {
return s.HTMLURL
}
// GetRepository returns the value of Repository.
func (s *SearchResultCodeItemsItem) GetRepository() OptRepository {
return s.Repository
}
// SetName sets the value of Name.
func (s *SearchResultCodeItemsItem) SetName(val OptString) {
s.Name = val
}
// SetPath sets the value of Path.
func (s *SearchResultCodeItemsItem) SetPath(val OptString) {
s.Path = val
}
// SetSha sets the value of Sha.
func (s *SearchResultCodeItemsItem) SetSha(val OptString) {
s.Sha = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *SearchResultCodeItemsItem) SetHTMLURL(val OptURI) {
s.HTMLURL = val
}
// SetRepository sets the value of Repository.
func (s *SearchResultCodeItemsItem) SetRepository(val OptRepository) {
s.Repository = val
}
// Ref: #/components/schemas/SearchResultIssues
type SearchResultIssues struct {
TotalCount int `json:"total_count"`
IncompleteResults OptBool `json:"incomplete_results"`
Items []Issue `json:"items"`
}
// GetTotalCount returns the value of TotalCount.
func (s *SearchResultIssues) GetTotalCount() int {
return s.TotalCount
}
// GetIncompleteResults returns the value of IncompleteResults.
func (s *SearchResultIssues) GetIncompleteResults() OptBool {
return s.IncompleteResults
}
// GetItems returns the value of Items.
func (s *SearchResultIssues) GetItems() []Issue {
return s.Items
}
// SetTotalCount sets the value of TotalCount.
func (s *SearchResultIssues) SetTotalCount(val int) {
s.TotalCount = val
}
// SetIncompleteResults sets the value of IncompleteResults.
func (s *SearchResultIssues) SetIncompleteResults(val OptBool) {
s.IncompleteResults = val
}
// SetItems sets the value of Items.
func (s *SearchResultIssues) SetItems(val []Issue) {
s.Items = val
}
// Ref: #/components/schemas/SearchResultRepositories
type SearchResultRepositories struct {
TotalCount int `json:"total_count"`
IncompleteResults OptBool `json:"incomplete_results"`
Items []Repository `json:"items"`
}
// GetTotalCount returns the value of TotalCount.
func (s *SearchResultRepositories) GetTotalCount() int {
return s.TotalCount
}
// GetIncompleteResults returns the value of IncompleteResults.
func (s *SearchResultRepositories) GetIncompleteResults() OptBool {
return s.IncompleteResults
}
// GetItems returns the value of Items.
func (s *SearchResultRepositories) GetItems() []Repository {
return s.Items
}
// SetTotalCount sets the value of TotalCount.
func (s *SearchResultRepositories) SetTotalCount(val int) {
s.TotalCount = val
}
// SetIncompleteResults sets the value of IncompleteResults.
func (s *SearchResultRepositories) SetIncompleteResults(val OptBool) {
s.IncompleteResults = val
}
// SetItems sets the value of Items.
func (s *SearchResultRepositories) SetItems(val []Repository) {
s.Items = val
}
// Ref: #/components/schemas/SimpleUser
type SimpleUser struct {
ID int64 `json:"id"`
Login string `json:"login"`
Name OptNilString `json:"name"`
Email OptNilString `json:"email"`
AvatarURL OptURI `json:"avatar_url"`
HTMLURL OptURI `json:"html_url"`
Type OptString `json:"type"`
Bio OptNilString `json:"bio"`
PublicRepos OptInt `json:"public_repos"`
PublicGists OptInt `json:"public_gists"`
Followers OptInt `json:"followers"`
Following OptInt `json:"following"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
// GetID returns the value of ID.
func (s *SimpleUser) GetID() int64 {
return s.ID
}
// GetLogin returns the value of Login.
func (s *SimpleUser) GetLogin() string {
return s.Login
}
// GetName returns the value of Name.
func (s *SimpleUser) GetName() OptNilString {
return s.Name
}
// GetEmail returns the value of Email.
func (s *SimpleUser) GetEmail() OptNilString {
return s.Email
}
// GetAvatarURL returns the value of AvatarURL.
func (s *SimpleUser) GetAvatarURL() OptURI {
return s.AvatarURL
}
// GetHTMLURL returns the value of HTMLURL.
func (s *SimpleUser) GetHTMLURL() OptURI {
return s.HTMLURL
}
// GetType returns the value of Type.
func (s *SimpleUser) GetType() OptString {
return s.Type
}
// GetBio returns the value of Bio.
func (s *SimpleUser) GetBio() OptNilString {
return s.Bio
}
// GetPublicRepos returns the value of PublicRepos.
func (s *SimpleUser) GetPublicRepos() OptInt {
return s.PublicRepos
}
// GetPublicGists returns the value of PublicGists.
func (s *SimpleUser) GetPublicGists() OptInt {
return s.PublicGists
}
// GetFollowers returns the value of Followers.
func (s *SimpleUser) GetFollowers() OptInt {
return s.Followers
}
// GetFollowing returns the value of Following.
func (s *SimpleUser) GetFollowing() OptInt {
return s.Following
}
// GetCreatedAt returns the value of CreatedAt.
func (s *SimpleUser) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *SimpleUser) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// SetID sets the value of ID.
func (s *SimpleUser) SetID(val int64) {
s.ID = val
}
// SetLogin sets the value of Login.
func (s *SimpleUser) SetLogin(val string) {
s.Login = val
}
// SetName sets the value of Name.
func (s *SimpleUser) SetName(val OptNilString) {
s.Name = val
}
// SetEmail sets the value of Email.
func (s *SimpleUser) SetEmail(val OptNilString) {
s.Email = val
}
// SetAvatarURL sets the value of AvatarURL.
func (s *SimpleUser) SetAvatarURL(val OptURI) {
s.AvatarURL = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *SimpleUser) SetHTMLURL(val OptURI) {
s.HTMLURL = val
}
// SetType sets the value of Type.
func (s *SimpleUser) SetType(val OptString) {
s.Type = val
}
// SetBio sets the value of Bio.
func (s *SimpleUser) SetBio(val OptNilString) {
s.Bio = val
}
// SetPublicRepos sets the value of PublicRepos.
func (s *SimpleUser) SetPublicRepos(val OptInt) {
s.PublicRepos = val
}
// SetPublicGists sets the value of PublicGists.
func (s *SimpleUser) SetPublicGists(val OptInt) {
s.PublicGists = val
}
// SetFollowers sets the value of Followers.
func (s *SimpleUser) SetFollowers(val OptInt) {
s.Followers = val
}
// SetFollowing sets the value of Following.
func (s *SimpleUser) SetFollowing(val OptInt) {
s.Following = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *SimpleUser) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *SimpleUser) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// Ref: #/components/schemas/UpdateIssueRequest
type UpdateIssueRequest struct {
Title OptString `json:"title"`
Body OptString `json:"body"`
State OptString `json:"state"`
Labels []string `json:"labels"`
Assignees []string `json:"assignees"`
}
// GetTitle returns the value of Title.
func (s *UpdateIssueRequest) GetTitle() OptString {
return s.Title
}
// GetBody returns the value of Body.
func (s *UpdateIssueRequest) GetBody() OptString {
return s.Body
}
// GetState returns the value of State.
func (s *UpdateIssueRequest) GetState() OptString {
return s.State
}
// GetLabels returns the value of Labels.
func (s *UpdateIssueRequest) GetLabels() []string {
return s.Labels
}
// GetAssignees returns the value of Assignees.
func (s *UpdateIssueRequest) GetAssignees() []string {
return s.Assignees
}
// SetTitle sets the value of Title.
func (s *UpdateIssueRequest) SetTitle(val OptString) {
s.Title = val
}
// SetBody sets the value of Body.
func (s *UpdateIssueRequest) SetBody(val OptString) {
s.Body = val
}
// SetState sets the value of State.
func (s *UpdateIssueRequest) SetState(val OptString) {
s.State = val
}
// SetLabels sets the value of Labels.
func (s *UpdateIssueRequest) SetLabels(val []string) {
s.Labels = val
}
// SetAssignees sets the value of Assignees.
func (s *UpdateIssueRequest) SetAssignees(val []string) {
s.Assignees = val
}
// Ref: #/components/schemas/Workflow
type Workflow struct {
ID int64 `json:"id"`
Name string `json:"name"`
Path OptString `json:"path"`
State string `json:"state"`
HTMLURL OptURI `json:"html_url"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
// GetID returns the value of ID.
func (s *Workflow) GetID() int64 {
return s.ID
}
// GetName returns the value of Name.
func (s *Workflow) GetName() string {
return s.Name
}
// GetPath returns the value of Path.
func (s *Workflow) GetPath() OptString {
return s.Path
}
// GetState returns the value of State.
func (s *Workflow) GetState() string {
return s.State
}
// GetHTMLURL returns the value of HTMLURL.
func (s *Workflow) GetHTMLURL() OptURI {
return s.HTMLURL
}
// GetCreatedAt returns the value of CreatedAt.
func (s *Workflow) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *Workflow) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// SetID sets the value of ID.
func (s *Workflow) SetID(val int64) {
s.ID = val
}
// SetName sets the value of Name.
func (s *Workflow) SetName(val string) {
s.Name = val
}
// SetPath sets the value of Path.
func (s *Workflow) SetPath(val OptString) {
s.Path = val
}
// SetState sets the value of State.
func (s *Workflow) SetState(val string) {
s.State = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *Workflow) SetHTMLURL(val OptURI) {
s.HTMLURL = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *Workflow) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *Workflow) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// Ref: #/components/schemas/WorkflowRun
type WorkflowRun struct {
ID int64 `json:"id"`
Name string `json:"name"`
HeadBranch OptString `json:"head_branch"`
HeadSha OptString `json:"head_sha"`
Status string `json:"status"`
Conclusion OptNilString `json:"conclusion"`
HTMLURL url.URL `json:"html_url"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
// GetID returns the value of ID.
func (s *WorkflowRun) GetID() int64 {
return s.ID
}
// GetName returns the value of Name.
func (s *WorkflowRun) GetName() string {
return s.Name
}
// GetHeadBranch returns the value of HeadBranch.
func (s *WorkflowRun) GetHeadBranch() OptString {
return s.HeadBranch
}
// GetHeadSha returns the value of HeadSha.
func (s *WorkflowRun) GetHeadSha() OptString {
return s.HeadSha
}
// GetStatus returns the value of Status.
func (s *WorkflowRun) GetStatus() string {
return s.Status
}
// GetConclusion returns the value of Conclusion.
func (s *WorkflowRun) GetConclusion() OptNilString {
return s.Conclusion
}
// GetHTMLURL returns the value of HTMLURL.
func (s *WorkflowRun) GetHTMLURL() url.URL {
return s.HTMLURL
}
// GetCreatedAt returns the value of CreatedAt.
func (s *WorkflowRun) GetCreatedAt() OptDateTime {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *WorkflowRun) GetUpdatedAt() OptDateTime {
return s.UpdatedAt
}
// SetID sets the value of ID.
func (s *WorkflowRun) SetID(val int64) {
s.ID = val
}
// SetName sets the value of Name.
func (s *WorkflowRun) SetName(val string) {
s.Name = val
}
// SetHeadBranch sets the value of HeadBranch.
func (s *WorkflowRun) SetHeadBranch(val OptString) {
s.HeadBranch = val
}
// SetHeadSha sets the value of HeadSha.
func (s *WorkflowRun) SetHeadSha(val OptString) {
s.HeadSha = val
}
// SetStatus sets the value of Status.
func (s *WorkflowRun) SetStatus(val string) {
s.Status = val
}
// SetConclusion sets the value of Conclusion.
func (s *WorkflowRun) SetConclusion(val OptNilString) {
s.Conclusion = val
}
// SetHTMLURL sets the value of HTMLURL.
func (s *WorkflowRun) SetHTMLURL(val url.URL) {
s.HTMLURL = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *WorkflowRun) SetCreatedAt(val OptDateTime) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *WorkflowRun) SetUpdatedAt(val OptDateTime) {
s.UpdatedAt = val
}
// Ref: #/components/schemas/WorkflowRunsResponse
type WorkflowRunsResponse struct {
TotalCount int `json:"total_count"`
WorkflowRuns []WorkflowRun `json:"workflow_runs"`
}
// GetTotalCount returns the value of TotalCount.
func (s *WorkflowRunsResponse) GetTotalCount() int {
return s.TotalCount
}
// GetWorkflowRuns returns the value of WorkflowRuns.
func (s *WorkflowRunsResponse) GetWorkflowRuns() []WorkflowRun {
return s.WorkflowRuns
}
// SetTotalCount sets the value of TotalCount.
func (s *WorkflowRunsResponse) SetTotalCount(val int) {
s.TotalCount = val
}
// SetWorkflowRuns sets the value of WorkflowRuns.
func (s *WorkflowRunsResponse) SetWorkflowRuns(val []WorkflowRun) {
s.WorkflowRuns = val
}
// Ref: #/components/schemas/WorkflowsResponse
type WorkflowsResponse struct {
TotalCount int `json:"total_count"`
Workflows []Workflow `json:"workflows"`
}
// GetTotalCount returns the value of TotalCount.
func (s *WorkflowsResponse) GetTotalCount() int {
return s.TotalCount
}
// GetWorkflows returns the value of Workflows.
func (s *WorkflowsResponse) GetWorkflows() []Workflow {
return s.Workflows
}
// SetTotalCount sets the value of TotalCount.
func (s *WorkflowsResponse) SetTotalCount(val int) {
s.TotalCount = val
}
// SetWorkflows sets the value of Workflows.
func (s *WorkflowsResponse) SetWorkflows(val []Workflow) {
s.Workflows = val
}