/*
Anchore Engine API Server

This is the Anchore Engine API. Provides the primary external API for users of the service.

API version: 0.1.20
Contact: nurmi@anchore.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package anchore

import (
	"encoding/json"
)

// UserCreationRequest A payload for creating a new user, includes the username and password in a single request
type UserCreationRequest struct {
	// The username to create
	Username string `json:"username"`
	// The initial password for the user, must be at least 6 characters, up to 128
	Password string `json:"password"`
}

// NewUserCreationRequest instantiates a new UserCreationRequest 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 NewUserCreationRequest(username string, password string) *UserCreationRequest {
	this := UserCreationRequest{}
	this.Username = username
	this.Password = password
	return &this
}

// NewUserCreationRequestWithDefaults instantiates a new UserCreationRequest 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 NewUserCreationRequestWithDefaults() *UserCreationRequest {
	this := UserCreationRequest{}
	return &this
}

// GetUsername returns the Username field value
func (o *UserCreationRequest) GetUsername() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Username
}

// GetUsernameOk returns a tuple with the Username field value
// and a boolean to check if the value has been set.
func (o *UserCreationRequest) GetUsernameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Username, true
}

// SetUsername sets field value
func (o *UserCreationRequest) SetUsername(v string) {
	o.Username = v
}

// GetPassword returns the Password field value
func (o *UserCreationRequest) GetPassword() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Password
}

// GetPasswordOk returns a tuple with the Password field value
// and a boolean to check if the value has been set.
func (o *UserCreationRequest) GetPasswordOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Password, true
}

// SetPassword sets field value
func (o *UserCreationRequest) SetPassword(v string) {
	o.Password = v
}

func (o UserCreationRequest) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["username"] = o.Username
	}
	if true {
		toSerialize["password"] = o.Password
	}
	return json.Marshal(toSerialize)
}

type NullableUserCreationRequest struct {
	value *UserCreationRequest
	isSet bool
}

func (v NullableUserCreationRequest) Get() *UserCreationRequest {
	return v.value
}

func (v *NullableUserCreationRequest) Set(val *UserCreationRequest) {
	v.value = val
	v.isSet = true
}

func (v NullableUserCreationRequest) IsSet() bool {
	return v.isSet
}

func (v *NullableUserCreationRequest) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableUserCreationRequest(val *UserCreationRequest) *NullableUserCreationRequest {
	return &NullableUserCreationRequest{value: val, isSet: true}
}

func (v NullableUserCreationRequest) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableUserCreationRequest) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


