|
| 1 | +// Code based on the AtlasAPI V2 OpenAPI file |
| 2 | + |
| 3 | +package admin |
| 4 | + |
| 5 | +import ( |
| 6 | + "encoding/json" |
| 7 | + "time" |
| 8 | +) |
| 9 | + |
| 10 | +// PushBasedLogExportProject struct for PushBasedLogExportProject |
| 11 | +type PushBasedLogExportProject struct { |
| 12 | + // The name of the bucket to which the agent will send the logs to. |
| 13 | + BucketName *string `json:"bucketName,omitempty"` |
| 14 | + // Date and time that this feature was enabled on. |
| 15 | + CreateDate *time.Time `json:"createDate,omitempty"` |
| 16 | + // ID of the AWS IAM role that will be used to write to the S3 bucket. |
| 17 | + IamRoleId *string `json:"iamRoleId,omitempty"` |
| 18 | + // 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. |
| 19 | + Links []Link `json:"links,omitempty"` |
| 20 | + // S3 directory in which vector will write to in order to store the logs. |
| 21 | + PrefixPath *string `json:"prefixPath,omitempty"` |
| 22 | + // Describes whether or not the feature is enabled and what status it is in. |
| 23 | + State *string `json:"state,omitempty"` |
| 24 | +} |
| 25 | + |
| 26 | +// NewPushBasedLogExportProject instantiates a new PushBasedLogExportProject object |
| 27 | +// This constructor will assign default values to properties that have it defined, |
| 28 | +// and makes sure properties required by API are set, but the set of arguments |
| 29 | +// will change when the set of required properties is changed |
| 30 | +func NewPushBasedLogExportProject() *PushBasedLogExportProject { |
| 31 | + this := PushBasedLogExportProject{} |
| 32 | + return &this |
| 33 | +} |
| 34 | + |
| 35 | +// NewPushBasedLogExportProjectWithDefaults instantiates a new PushBasedLogExportProject object |
| 36 | +// This constructor will only assign default values to properties that have it defined, |
| 37 | +// but it doesn't guarantee that properties required by API are set |
| 38 | +func NewPushBasedLogExportProjectWithDefaults() *PushBasedLogExportProject { |
| 39 | + this := PushBasedLogExportProject{} |
| 40 | + return &this |
| 41 | +} |
| 42 | + |
| 43 | +// GetBucketName returns the BucketName field value if set, zero value otherwise |
| 44 | +func (o *PushBasedLogExportProject) GetBucketName() string { |
| 45 | + if o == nil || IsNil(o.BucketName) { |
| 46 | + var ret string |
| 47 | + return ret |
| 48 | + } |
| 49 | + return *o.BucketName |
| 50 | +} |
| 51 | + |
| 52 | +// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise |
| 53 | +// and a boolean to check if the value has been set. |
| 54 | +func (o *PushBasedLogExportProject) GetBucketNameOk() (*string, bool) { |
| 55 | + if o == nil || IsNil(o.BucketName) { |
| 56 | + return nil, false |
| 57 | + } |
| 58 | + |
| 59 | + return o.BucketName, true |
| 60 | +} |
| 61 | + |
| 62 | +// HasBucketName returns a boolean if a field has been set. |
| 63 | +func (o *PushBasedLogExportProject) HasBucketName() bool { |
| 64 | + if o != nil && !IsNil(o.BucketName) { |
| 65 | + return true |
| 66 | + } |
| 67 | + |
| 68 | + return false |
| 69 | +} |
| 70 | + |
| 71 | +// SetBucketName gets a reference to the given string and assigns it to the BucketName field. |
| 72 | +func (o *PushBasedLogExportProject) SetBucketName(v string) { |
| 73 | + o.BucketName = &v |
| 74 | +} |
| 75 | + |
| 76 | +// GetCreateDate returns the CreateDate field value if set, zero value otherwise |
| 77 | +func (o *PushBasedLogExportProject) GetCreateDate() time.Time { |
| 78 | + if o == nil || IsNil(o.CreateDate) { |
| 79 | + var ret time.Time |
| 80 | + return ret |
| 81 | + } |
| 82 | + return *o.CreateDate |
| 83 | +} |
| 84 | + |
| 85 | +// GetCreateDateOk returns a tuple with the CreateDate field value if set, nil otherwise |
| 86 | +// and a boolean to check if the value has been set. |
| 87 | +func (o *PushBasedLogExportProject) GetCreateDateOk() (*time.Time, bool) { |
| 88 | + if o == nil || IsNil(o.CreateDate) { |
| 89 | + return nil, false |
| 90 | + } |
| 91 | + |
| 92 | + return o.CreateDate, true |
| 93 | +} |
| 94 | + |
| 95 | +// HasCreateDate returns a boolean if a field has been set. |
| 96 | +func (o *PushBasedLogExportProject) HasCreateDate() bool { |
| 97 | + if o != nil && !IsNil(o.CreateDate) { |
| 98 | + return true |
| 99 | + } |
| 100 | + |
| 101 | + return false |
| 102 | +} |
| 103 | + |
| 104 | +// SetCreateDate gets a reference to the given time.Time and assigns it to the CreateDate field. |
| 105 | +func (o *PushBasedLogExportProject) SetCreateDate(v time.Time) { |
| 106 | + o.CreateDate = &v |
| 107 | +} |
| 108 | + |
| 109 | +// GetIamRoleId returns the IamRoleId field value if set, zero value otherwise |
| 110 | +func (o *PushBasedLogExportProject) GetIamRoleId() string { |
| 111 | + if o == nil || IsNil(o.IamRoleId) { |
| 112 | + var ret string |
| 113 | + return ret |
| 114 | + } |
| 115 | + return *o.IamRoleId |
| 116 | +} |
| 117 | + |
| 118 | +// GetIamRoleIdOk returns a tuple with the IamRoleId field value if set, nil otherwise |
| 119 | +// and a boolean to check if the value has been set. |
| 120 | +func (o *PushBasedLogExportProject) GetIamRoleIdOk() (*string, bool) { |
| 121 | + if o == nil || IsNil(o.IamRoleId) { |
| 122 | + return nil, false |
| 123 | + } |
| 124 | + |
| 125 | + return o.IamRoleId, true |
| 126 | +} |
| 127 | + |
| 128 | +// HasIamRoleId returns a boolean if a field has been set. |
| 129 | +func (o *PushBasedLogExportProject) HasIamRoleId() bool { |
| 130 | + if o != nil && !IsNil(o.IamRoleId) { |
| 131 | + return true |
| 132 | + } |
| 133 | + |
| 134 | + return false |
| 135 | +} |
| 136 | + |
| 137 | +// SetIamRoleId gets a reference to the given string and assigns it to the IamRoleId field. |
| 138 | +func (o *PushBasedLogExportProject) SetIamRoleId(v string) { |
| 139 | + o.IamRoleId = &v |
| 140 | +} |
| 141 | + |
| 142 | +// GetLinks returns the Links field value if set, zero value otherwise |
| 143 | +func (o *PushBasedLogExportProject) GetLinks() []Link { |
| 144 | + if o == nil || IsNil(o.Links) { |
| 145 | + var ret []Link |
| 146 | + return ret |
| 147 | + } |
| 148 | + return o.Links |
| 149 | +} |
| 150 | + |
| 151 | +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise |
| 152 | +// and a boolean to check if the value has been set. |
| 153 | +func (o *PushBasedLogExportProject) GetLinksOk() ([]Link, bool) { |
| 154 | + if o == nil || IsNil(o.Links) { |
| 155 | + return nil, false |
| 156 | + } |
| 157 | + |
| 158 | + return o.Links, true |
| 159 | +} |
| 160 | + |
| 161 | +// HasLinks returns a boolean if a field has been set. |
| 162 | +func (o *PushBasedLogExportProject) HasLinks() bool { |
| 163 | + if o != nil && !IsNil(o.Links) { |
| 164 | + return true |
| 165 | + } |
| 166 | + |
| 167 | + return false |
| 168 | +} |
| 169 | + |
| 170 | +// SetLinks gets a reference to the given []Link and assigns it to the Links field. |
| 171 | +func (o *PushBasedLogExportProject) SetLinks(v []Link) { |
| 172 | + o.Links = v |
| 173 | +} |
| 174 | + |
| 175 | +// GetPrefixPath returns the PrefixPath field value if set, zero value otherwise |
| 176 | +func (o *PushBasedLogExportProject) GetPrefixPath() string { |
| 177 | + if o == nil || IsNil(o.PrefixPath) { |
| 178 | + var ret string |
| 179 | + return ret |
| 180 | + } |
| 181 | + return *o.PrefixPath |
| 182 | +} |
| 183 | + |
| 184 | +// GetPrefixPathOk returns a tuple with the PrefixPath field value if set, nil otherwise |
| 185 | +// and a boolean to check if the value has been set. |
| 186 | +func (o *PushBasedLogExportProject) GetPrefixPathOk() (*string, bool) { |
| 187 | + if o == nil || IsNil(o.PrefixPath) { |
| 188 | + return nil, false |
| 189 | + } |
| 190 | + |
| 191 | + return o.PrefixPath, true |
| 192 | +} |
| 193 | + |
| 194 | +// HasPrefixPath returns a boolean if a field has been set. |
| 195 | +func (o *PushBasedLogExportProject) HasPrefixPath() bool { |
| 196 | + if o != nil && !IsNil(o.PrefixPath) { |
| 197 | + return true |
| 198 | + } |
| 199 | + |
| 200 | + return false |
| 201 | +} |
| 202 | + |
| 203 | +// SetPrefixPath gets a reference to the given string and assigns it to the PrefixPath field. |
| 204 | +func (o *PushBasedLogExportProject) SetPrefixPath(v string) { |
| 205 | + o.PrefixPath = &v |
| 206 | +} |
| 207 | + |
| 208 | +// GetState returns the State field value if set, zero value otherwise |
| 209 | +func (o *PushBasedLogExportProject) GetState() string { |
| 210 | + if o == nil || IsNil(o.State) { |
| 211 | + var ret string |
| 212 | + return ret |
| 213 | + } |
| 214 | + return *o.State |
| 215 | +} |
| 216 | + |
| 217 | +// GetStateOk returns a tuple with the State field value if set, nil otherwise |
| 218 | +// and a boolean to check if the value has been set. |
| 219 | +func (o *PushBasedLogExportProject) GetStateOk() (*string, bool) { |
| 220 | + if o == nil || IsNil(o.State) { |
| 221 | + return nil, false |
| 222 | + } |
| 223 | + |
| 224 | + return o.State, true |
| 225 | +} |
| 226 | + |
| 227 | +// HasState returns a boolean if a field has been set. |
| 228 | +func (o *PushBasedLogExportProject) HasState() bool { |
| 229 | + if o != nil && !IsNil(o.State) { |
| 230 | + return true |
| 231 | + } |
| 232 | + |
| 233 | + return false |
| 234 | +} |
| 235 | + |
| 236 | +// SetState gets a reference to the given string and assigns it to the State field. |
| 237 | +func (o *PushBasedLogExportProject) SetState(v string) { |
| 238 | + o.State = &v |
| 239 | +} |
| 240 | + |
| 241 | +func (o PushBasedLogExportProject) MarshalJSONWithoutReadOnly() ([]byte, error) { |
| 242 | + toSerialize, err := o.ToMap() |
| 243 | + if err != nil { |
| 244 | + return []byte{}, err |
| 245 | + } |
| 246 | + return json.Marshal(toSerialize) |
| 247 | +} |
| 248 | +func (o PushBasedLogExportProject) ToMap() (map[string]interface{}, error) { |
| 249 | + toSerialize := map[string]interface{}{} |
| 250 | + if !IsNil(o.BucketName) { |
| 251 | + toSerialize["bucketName"] = o.BucketName |
| 252 | + } |
| 253 | + if !IsNil(o.IamRoleId) { |
| 254 | + toSerialize["iamRoleId"] = o.IamRoleId |
| 255 | + } |
| 256 | + if !IsNil(o.PrefixPath) { |
| 257 | + toSerialize["prefixPath"] = o.PrefixPath |
| 258 | + } |
| 259 | + if !IsNil(o.State) { |
| 260 | + toSerialize["state"] = o.State |
| 261 | + } |
| 262 | + return toSerialize, nil |
| 263 | +} |
0 commit comments