|
| 1 | +// Code based on the AtlasAPI V2 OpenAPI file |
| 2 | + |
| 3 | +package admin |
| 4 | + |
| 5 | +import ( |
| 6 | + "encoding/json" |
| 7 | +) |
| 8 | + |
| 9 | +// PaginatedFederationIdentityProvider struct for PaginatedFederationIdentityProvider |
| 10 | +type PaginatedFederationIdentityProvider struct { |
| 11 | + // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. |
| 12 | + // Read only field. |
| 13 | + Links *[]Link `json:"links,omitempty"` |
| 14 | + // List of returned documents that MongoDB Cloud providers when completing this request. |
| 15 | + // Read only field. |
| 16 | + Results *[]FederationIdentityProvider `json:"results,omitempty"` |
| 17 | + // Number of documents returned in this response if **includeCount** query param is true. |
| 18 | + // Read only field. |
| 19 | + TotalCount *int `json:"totalCount,omitempty"` |
| 20 | +} |
| 21 | + |
| 22 | +// NewPaginatedFederationIdentityProvider instantiates a new PaginatedFederationIdentityProvider object |
| 23 | +// This constructor will assign default values to properties that have it defined, |
| 24 | +// and makes sure properties required by API are set, but the set of arguments |
| 25 | +// will change when the set of required properties is changed |
| 26 | +func NewPaginatedFederationIdentityProvider() *PaginatedFederationIdentityProvider { |
| 27 | + this := PaginatedFederationIdentityProvider{} |
| 28 | + return &this |
| 29 | +} |
| 30 | + |
| 31 | +// NewPaginatedFederationIdentityProviderWithDefaults instantiates a new PaginatedFederationIdentityProvider object |
| 32 | +// This constructor will only assign default values to properties that have it defined, |
| 33 | +// but it doesn't guarantee that properties required by API are set |
| 34 | +func NewPaginatedFederationIdentityProviderWithDefaults() *PaginatedFederationIdentityProvider { |
| 35 | + this := PaginatedFederationIdentityProvider{} |
| 36 | + return &this |
| 37 | +} |
| 38 | + |
| 39 | +// GetLinks returns the Links field value if set, zero value otherwise |
| 40 | +func (o *PaginatedFederationIdentityProvider) GetLinks() []Link { |
| 41 | + if o == nil || IsNil(o.Links) { |
| 42 | + var ret []Link |
| 43 | + return ret |
| 44 | + } |
| 45 | + return *o.Links |
| 46 | +} |
| 47 | + |
| 48 | +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise |
| 49 | +// and a boolean to check if the value has been set. |
| 50 | +func (o *PaginatedFederationIdentityProvider) GetLinksOk() (*[]Link, bool) { |
| 51 | + if o == nil || IsNil(o.Links) { |
| 52 | + return nil, false |
| 53 | + } |
| 54 | + |
| 55 | + return o.Links, true |
| 56 | +} |
| 57 | + |
| 58 | +// HasLinks returns a boolean if a field has been set. |
| 59 | +func (o *PaginatedFederationIdentityProvider) HasLinks() bool { |
| 60 | + if o != nil && !IsNil(o.Links) { |
| 61 | + return true |
| 62 | + } |
| 63 | + |
| 64 | + return false |
| 65 | +} |
| 66 | + |
| 67 | +// SetLinks gets a reference to the given []Link and assigns it to the Links field. |
| 68 | +func (o *PaginatedFederationIdentityProvider) SetLinks(v []Link) { |
| 69 | + o.Links = &v |
| 70 | +} |
| 71 | + |
| 72 | +// GetResults returns the Results field value if set, zero value otherwise |
| 73 | +func (o *PaginatedFederationIdentityProvider) GetResults() []FederationIdentityProvider { |
| 74 | + if o == nil || IsNil(o.Results) { |
| 75 | + var ret []FederationIdentityProvider |
| 76 | + return ret |
| 77 | + } |
| 78 | + return *o.Results |
| 79 | +} |
| 80 | + |
| 81 | +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise |
| 82 | +// and a boolean to check if the value has been set. |
| 83 | +func (o *PaginatedFederationIdentityProvider) GetResultsOk() (*[]FederationIdentityProvider, bool) { |
| 84 | + if o == nil || IsNil(o.Results) { |
| 85 | + return nil, false |
| 86 | + } |
| 87 | + |
| 88 | + return o.Results, true |
| 89 | +} |
| 90 | + |
| 91 | +// HasResults returns a boolean if a field has been set. |
| 92 | +func (o *PaginatedFederationIdentityProvider) HasResults() bool { |
| 93 | + if o != nil && !IsNil(o.Results) { |
| 94 | + return true |
| 95 | + } |
| 96 | + |
| 97 | + return false |
| 98 | +} |
| 99 | + |
| 100 | +// SetResults gets a reference to the given []FederationIdentityProvider and assigns it to the Results field. |
| 101 | +func (o *PaginatedFederationIdentityProvider) SetResults(v []FederationIdentityProvider) { |
| 102 | + o.Results = &v |
| 103 | +} |
| 104 | + |
| 105 | +// GetTotalCount returns the TotalCount field value if set, zero value otherwise |
| 106 | +func (o *PaginatedFederationIdentityProvider) GetTotalCount() int { |
| 107 | + if o == nil || IsNil(o.TotalCount) { |
| 108 | + var ret int |
| 109 | + return ret |
| 110 | + } |
| 111 | + return *o.TotalCount |
| 112 | +} |
| 113 | + |
| 114 | +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise |
| 115 | +// and a boolean to check if the value has been set. |
| 116 | +func (o *PaginatedFederationIdentityProvider) GetTotalCountOk() (*int, bool) { |
| 117 | + if o == nil || IsNil(o.TotalCount) { |
| 118 | + return nil, false |
| 119 | + } |
| 120 | + |
| 121 | + return o.TotalCount, true |
| 122 | +} |
| 123 | + |
| 124 | +// HasTotalCount returns a boolean if a field has been set. |
| 125 | +func (o *PaginatedFederationIdentityProvider) HasTotalCount() bool { |
| 126 | + if o != nil && !IsNil(o.TotalCount) { |
| 127 | + return true |
| 128 | + } |
| 129 | + |
| 130 | + return false |
| 131 | +} |
| 132 | + |
| 133 | +// SetTotalCount gets a reference to the given int and assigns it to the TotalCount field. |
| 134 | +func (o *PaginatedFederationIdentityProvider) SetTotalCount(v int) { |
| 135 | + o.TotalCount = &v |
| 136 | +} |
| 137 | + |
| 138 | +func (o PaginatedFederationIdentityProvider) MarshalJSONWithoutReadOnly() ([]byte, error) { |
| 139 | + toSerialize, err := o.ToMap() |
| 140 | + if err != nil { |
| 141 | + return []byte{}, err |
| 142 | + } |
| 143 | + return json.Marshal(toSerialize) |
| 144 | +} |
| 145 | +func (o PaginatedFederationIdentityProvider) ToMap() (map[string]interface{}, error) { |
| 146 | + toSerialize := map[string]interface{}{} |
| 147 | + return toSerialize, nil |
| 148 | +} |
0 commit comments