// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest AuthorizationTestIamPermissionsRequest is a request to test a set of permissions.
//
// swagger:model hashicorp.cloud.resourcemanager.AuthorizationTestIamPermissionsRequest
type HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest struct {

	// Permissions is the set of permissions to test.
	Permissions []string `json:"permissions"`

	// ResourceId holds the unique, immutable and non-reusable ID of the resource.
	//
	// Example formats include:
	//   - vault.cluster:t79BRg8WhTmDPBRM
	//   - vagrant.box:gTmD2KMMRt9DWhJz
	ResourceID string `json:"resource_id,omitempty"`

	// ResourceName holds the Resource Name in the Resource Identifier v2 format.
	// This parameter is expected to be provided only for external calls.
	//
	// Example formats include:
	//   - vault/project/e1e04e11-d590-41cf-b818-1535bc4b4889/cluster/my-cluster
	//   - vagrant/organization/ubuntu/box/lunar64/version/v20230130.0.0
	//   - iam/organization/zBmk8k7Pk99ph7Kr/service-principal/my-sp-43563412
	//   - consul/project/e57a01aa-1929-40e8-80b8-4907fc46429c/cluster/my-cluster
	//
	// In case of organization or project level authorization the ResourceName is
	// expected to be provided in the following format:
	//   - organization/863063b6-c485-4cf4-8df3-6991a2ffd4b4
	//   - project/e1e04e11-d590-41cf-b818-1535bc4b4889
	//   - project/gTmD2KMMRt9DWhJz
	ResourceName string `json:"resource_name,omitempty"`
}

// Validate validates this hashicorp cloud resourcemanager authorization test iam permissions request
func (m *HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this hashicorp cloud resourcemanager authorization test iam permissions request based on context it is used
func (m *HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest) UnmarshalBinary(b []byte) error {
	var res HashicorpCloudResourcemanagerAuthorizationTestIamPermissionsRequest
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
